ssh登录,爬坑系列

最近在实验室弄ssh登录,结果被虐了,要注意以下:

  1.主机名不能包括   -     _    !  等非法字符。

  2.如果hadoop格式化时,报:SHUTDOWN_MSG: Shutting down NameNode at java.net.UnknownHostException: datanode:unknown error”,请:

          查看本身用户的主机名:hostname
               查看/etc/hosts内容:cat /etc/hosts
               hosts文件 里面我们自己随意起的主机名字是不可以的,必须与 节点主机hostname一致。

  3. ssh登录时出现The authenticity of host‘***** ' can't be established.采用:

      修改/etc/ssh/ssh_config文件(或$HOME/.ssh/config)中的配置,添加如下两行配置:

        StrictHostKeyChecking no

        UserKnownHostsFile /dev/null

        但容易产生潜在威胁。

 

原文地址:https://www.cnblogs.com/xr210/p/9733299.html