Alpine Linux 开启ssh 使用xshell连接
Alpine Linux 开启ssh 使用xshell连接
一、修改sshd_config
1 | vi /etc/ssh/sshd_config |
二、去掉注释,修改文件内容为
1 | PasswordAuthentication yes |
三、重启sshd
1 | service sshd restart |
四、用root登录测试
1 | ssh root@127.0.0.1 |
五、xshell连接
① 在系统中查看ip地址
1 | ip a |
② 配置好服务器ip、账号密码连接即可
注:
如果出现问题:
① /etc/ssh/ssh_config: line 54: Bad configuration option: permitrootlogin
说明改错文件了,不是改ssh_config(客户端)而是要改sshd_config(服务器)
② 如果未设置root密码,则需要设置root密码
1 | passwd root |
All articles on this blog are licensed under CC BY-NC-SA 4.0 unless otherwise stated.