赞
踩
ssh localhost的时候遇到:
ubuntu@VM-0-15-ubuntu:~/taoge/hadoop_begin/hadoop-2.7.5$ ssh localhost
The authenticity of host 'localhost (127.0.0.1)' can't be established.
怎么办?
ubuntu@VM-0-15-ubuntu:~/.ssh$ chmod 777 /etc/ssh/ssh_config
然后在这个文件的最后两行加上:
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
如下:
ubuntu@VM-0-15-ubuntu:~$ tail /etc/ssh/ssh_config
# PermitLocalCommand no
# VisualHostKey no
# ProxyCommand ssh -q -W %h:%p gateway.example.com
# RekeyLimit 1G 1h
SendEnv LANG LC_*
HashKnownHosts yes
GSSAPIAuthentication yes
GSSAPIDelegateCredentials no
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
ubuntu@VM-0-15-ubuntu:~$
于是乎:
ubuntu@VM-0-15-ubuntu:~$ ssh localhost
Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts.
搞定。 后面的问题一路顺畅。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。