我有两个服务器(A和B)和本地计算机。我正在尝试将文件从服务器A传输到服务器B。
从服务器A:
scp ./backup.tar [email protected]:/home/public/
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey, password).
lost connection
从服务器B:
scp [email protected]:/home/public/backup.tar .
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey, password).
lost connection
当我从本地计算机尝试时出现相同的错误消息。这是怎么回事?
这是我尝试使用调试标志从服务器A SSH到服务器B时得到的结果:
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /home/private/.ssh/identity
debug1: Trying private key: /home/private/.ssh/id_rsa
debug1: Trying private key: /home/private/.ssh/id_dsa
debug1: Next authentication method: password
debug1: read_passphrase: can't open /dev/tty: No such file or directory
debug1: Authentications that can continue: publickey,password
Permission denied, please try again.
debug1: read_passphrase: can't open /dev/tty: No such file or directory
debug1: Authentications that can continue: publickey,password
Permission denied, please try again.
debug1: read_passphrase: can't open /dev/tty: No such file or directory
debug1: Authentications that can continue: publickey,password
debug1: No more authentication methods to try.
Permission denied (publickey,password).
这是否意味着找不到我的终端?我应该提到服务器B是服务器A的子域。但是,我的托管服务提供商将它们视为完全不同的实体,并且它们没有托管在同一LPAR上。
结束语我已经给托管服务提供商发送了电子邮件,似乎存在一个与ssh版本和OS(freeBSD)有关的小错误。当前,我的解决方法是(1)将文件本地本地存储到我的机器上,然后(2)将文件本地本地存储到第二台服务器上。这是scp -3
应该做的,但同样失败。
看来ssh
服务器上的配置存在问题-您无法从任何一个服务器SSH (可能出于安全原因)。
您可以尝试Stephane的建议从本地计算机(scp [email protected]:/home/public/backup.tar [email protected]:/home/public/
)进行传输。这应该排除从终端(我可能在服务器上故意创建)输入的问题。
如果那没有帮助,那将意味着提供程序可能不允许传出的ssh连接。在这种情况下,您将有两个选择:
或者
通过本地计算机传输文件:
scp -3 [email protected]:/home/public/backup.tar [email protected]:/ home / public /
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句