赞
踩
localhost: ssh: connect to host localhost port 22: Connection refused
遇到这个问题,首先查看是否安装了ssh,并查看ssh进程是否开启。
apt-get install ssh openssh-server
/etc/init.d/ssh start
sudo service ssh start
查看进程
ps -e | grep sshd
下图为进程开启时。
提示
sshd: no hostkeys available — exiting
可以查看一下/etc/ssh/
目录下是否有对应的key文件,如若没有,则可以尝试下面两条指令生成。
ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key
ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
0.0.0.0: ssh: connect to host 0.0.0.0 port 22: Connection refused
The authenticity of host '0.0.0.0 (0.0.0.0)' can't be established.
RSA key fingerprint is SHA256:KxxxxxxxxxxxxxxxxxxOcFgE.
遇到这两个错,查阅资料说是本地地址没有配置免密码登录,直接在shell中yes就可以了
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
不成功可以试试下面这个
ssh-copy-id -i ~/.ssh/id_rsa.pub 0.0.0.0
另:在修改过xml文件之后,如果有节点启动不成功,可以想想是不是改动了部分的目录,再对症下药。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。