service ssh start
但启动后,仍然无法从远程连接,会有提示:
Read from socket failed: Connection reset by peer
这个时候需要生成密钥文件,方法如下
#ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
#ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key
#sshd-generate 现在就可以用ssh远程登陆了
Powered by: 博客园 Copyright © 2024 hello!world Powered by .NET 8.0 on Kubernetes