将文件从远程服务器传输到远程服务器

将文件从远程服务器传输到远程服务器

我正在尝试将文件从 Site5 传输到 GoDaddy 网站托管帐户。GoDaddy 网站托管帐户是随域名免费提供的帐户,因此没有 ssh 访问权限。

sudo scp -v @:/home//wordpress.tar -o 'StrictHostKeyChecking no' @www.domain.com:/home/content/m/c/o//wordpress.tar

目的地是godaddy免费主机账户,上面的用户名是ftp用户名。

当我尝试输入 godaddy ftpuser 的密码时出现以下错误

debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /root/.ssh/id_rsa
debug1: Trying private key: /root/.ssh/id_dsa
debug1: Trying private key: /root/.ssh/id_ecdsa
debug1: Next authentication method: keyboard-interactive
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: password
[email protected]'s password: 
debug1: Authentications that can continue: publickey,password,keyboard-interactive
Permission denied, please try again.
[email protected]'s password: 
debug1: Authentications that can continue: publickey,password,keyboard-interactive
Permission denied, please try again.
[email protected]'s password: 
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: No more authentication methods to try.
Permission denied (publickey,password,keyboard-interactive).
lost connection

我在这里做错了什么?

编辑(更多内容以帮助调试问题)

当我尝试使用 FTPZilla 时,它使用 FTP 端口可以正常连接到服务器。当我输入端口 22 时,它接受 RSA 并给出错误。

Response:   fzSftp started
Command:    open "[email protected]" 22
Command:    Trust new Hostkey: Once
Command:    Pass: ************
Error:  Authentication failed.
Error:  Critical error
Error:  Could not connect to server

编辑2

从启用了 ssh 的 site5 服务器进行 FTP 连接时出现以下错误

ftp  [email protected]
ftp: [email protected]: unknown host

答案1

sftp并且ftp完全地不同的协议,所以,如果正如你所说,你在一端没有 ssh/sftp 访问权限,我认为追求 scp 选项没有任何价值。

我个人会 ssh 到您有权访问的那一端,然后使用您有权访问的任何协议来推送(或拉取)文件。您使用的是ftp

user@home$ ssh [email protected]
user@server$ ftp server2.com
> # login here
> cd /the/right/path
> mget * 
> mput *
> bye

你不想两个都 mget或者mput,只需选择一个适合您推送或拉取文件的方向即可。

相关内容