ssh sftp 无法登陆

ssh root@****
Authorized uses only. All activity may be monitored and reported
Password: 

Read from remote host *****: Connection reset by peer


Network error: Software caused connection abort

/var/log/secure.log可以看到这样的错误:

Bad item passed to pam_*_item()

有一种错误的原因是:

 /etc/environment中加入了错误的内容。

解决办法:清空 /etc/environment。


这个错误会影响所有基于openssh的客户端,比如putty,filezilla或者java的jsch库,但是不会影响xshell这种客户端。



你可能感兴趣的:(IT小技巧)