问题:
尝试从Mac终端登录godaddy服务器上传某些图像(使用脚本)。使用ssh连接到服务器时,我收到以下错误
ssh admin@pricereview.in
输出
ssh_exchange_identification: read: Connection reset by peer
更多调试运行
ssh -v admin@pricereview.in
输出
ankits-MacBook-Air:ssh ankit$ ssh -v pricereview.in
OpenSSH_6.9p1, LibreSSL 2.1.8
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Connecting to pricereview.in [166.62.27.64] port 22.
debug1: Connection established.
debug1: identity file /Users/ankit/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/ankit/.ssh/id_rsa-cert type -1
debug1: identity file /Users/ankit/.ssh/id_dsa type 2
debug1: key_load_public: No such file or directory
debug1: identity file /Users/ankit/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/ankit/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/ankit/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/ankit/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/ankit/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.9
ssh_exchange_identification: read: Connection reset by peer
同时检查:
ankits-MacBook-Air:ssh ankit$ ls -ltr ~/.ssh/
total 40
-rw-------@ 1 ankit staff 412 Jan 24 11:55 id_rsa.pub
-rw-------@ 1 ankit staff 1766 Jan 24 11:55 id_rsa
-rw-r--r-- 1 ankit staff 620 Jan 24 11:55 id_dsa.pub
-rw------- 1 ankit staff 751 Jan 24 11:55 id_dsa
-rw------- 1 ankit staff 412 Jan 24 12:03 authorized_keys
ankits-MacBook-Air:ssh ankit$
godaddy服务器上的设置:
id_rsa --->公钥和私钥存在
通过从mac复制它来手动导入id_rsa。
目标:主要目的是使用shell脚本将图像从mac上传到服务器/网站。
答案 0 :(得分:0)
使用ftp shell脚本,创建了shell脚本并且工作正常。
答案 1 :(得分:0)
您是否尝试使用主要ftp用户?