ssh各种错误集合

一、根据私钥生产公钥

ssh-keygen -y -f id_rsa.pem

二、

<1>

i174 .ssh # ssh 192.168.5.121
No RSA host key is known for 192.168.5.121 and you have requested strict checking.
Host key verification failed.

解决=>把/etc/ssh/ssh_config这项去掉!

# StrictHostKeyChecking yes
<2>Server refused to allocate pty错误解决

Server refused to allocate pty错误解决

    今天在启动虚拟机的时候,想从宿主机ssh到虚拟机,但是输入用户名

    与密码后,出现以下错误: Server refused to allocate pty

    在虚拟机中做如下操作可解决问题:

    mknod -m 666 /dev/ptmx c 5 2        

    #chmod 666 /dev/ptmx

    mkdir /dev/pts

    #编辑/etc/fstab,加入:

    none /dev/pts devpts  gid=5,mode=620 0 0          //"devpts"    is   fs_vfstype

    mount /dev/pts

附解释===>

mknod [OPTION]... NAME TYPE [MAJOR MINOR]

-m, --mode=MODE     set file permission bits to MODE, not a=rw - umask

Both MAJOR and MINOR must be specified when TYPE is b, c, or u, and they must be omitted when TYPE is p. If MAJOR or MINOR begins with 0x or 0X, it
is interpreted as hexadecimal; otherwise, if it begins with 0, as octal; otherwise, as decimal. TYPE may be:

b create a block (buffered) special file

c, u create a character (unbuffered) special file

p create a FIFO

posted @ 2015-07-15 16:40  arun_yh  阅读(846)  评论(0编辑  收藏  举报