Fedora 32 开启SSH

目录

  • 命令行方式
  • GUI界面方式

命令行方式

Fedora 中自带了ssh,默认没启动

使用ssh命令返回如下信息:

[jxxchallenger@localhost ~]$ ssh [email protected]
ssh: connect to host 192.168.1.6 port 22: Connection refused
[jxxchallenger@localhost ~]$ systemctl status sshd.service 
● sshd.service - OpenSSH server daemon
     Loaded: loaded (/usr/lib/systemd/system/sshd.service; disabled; vendor pre>
     Active: inactive (dead)
       Docs: man:sshd(8)
             man:sshd_config(5)

启动sshd进程

[jxxchallenger@localhost ~]$ systemctl start sshd.service

查看状态:

[jxxchallenger@localhost ~]$ systemctl status sshd.service 
● sshd.service - OpenSSH server daemon
     Loaded: loaded (/usr/lib/systemd/system/sshd.service; disabled; vendor pre>
     Active: active (running) since Mon 2021-08-23 20:12:38 CST; 6s ago
       Docs: man:sshd(8)
             man:sshd_config(5)
   Main PID: 3698 (sshd)
      Tasks: 1 (limit: 19009)
     Memory: 1.3M
        CPU: 10ms
     CGroup: /system.slice/sshd.service
             └─3698 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups

关闭sshd进程:

[jxxchallenger@localhost ~]$ systemctl stop sshd.service 

GUI界面方式

通过GNOME设置–>共享

Fedora 32 开启SSH_第1张图片
点击远程登录,然后开启

你可能感兴趣的:(Linux,ssh,linux)