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

        但容易产生潜在威胁。

 

posted @ 2018-09-30 20:50  山兮木  阅读(117)  评论(0编辑  收藏  举报
/* 看板娘 */