我正在通过Mac终端处理远程服务器,因为我从10.5中将它更新为OSX 10.10,每次我尝试从服务器到我的计算机上scp
时,我就开始接收这条消息:
ssh_exchange_identification: Connection closed by remote host
lost connection
如果我向后执行scp
(从mac复制到服务器),它会很好地工作,如果我从另一个mac执行它也会很好。
如果我做了一个verobse scp
,它会给我以下内容:
Executing: program /usr/bin/ssh host xx.xx.xx.x, user User, command scp -v -t /Users/User
OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to xx.xx.xx.x [xx.xx.xx.x] port 22.
debug1: Connection established.
debug1: identity file /home/user/.ssh/identity type -1
debug1: identity file /home/user/.ssh/identity-cert type -1
debug1: identity file /home/user/.ssh/id_rsa type -1
debug1: identity file /home/user/.ssh/id_rsa-cert type -1
debug1: identity file /home/user/.ssh/id_dsa type -1
debug1: identity file /home/user/.ssh/id_dsa-cert type -1
debug1: identity file /home/user/.ssh/id_ecdsa type -1
debug1: identity file /home/user/.ssh/id_ecdsa-cert type -1
ssh_exchange_identification: Connection closed by remote host
lost connection
我试着查看各种主机、config、ssh文件,但我没有解决太多问题。
发布于 2015-05-27 18:24:08
从我的个人Mac到我们作为本地服务器使用的Mac桌面,我只是遇到了同样的问题。运行sudo sshd -t
向我展示了以下提示:
/var/empty must be owned by root and not group or world-writable
我所做的只是将所有者改为root (我不知道为什么还没有,但我记得从小牛队升级到Yosemite给我带来了一些权限方面的麻烦):
cd /var
sudo chown root empty
希望能帮上忙。
https://stackoverflow.com/questions/30326594
复制相似问题