h3c設備做路由,sftp時報Couldn't read packet: Connection reset by peer錯誤的一種解決辦法。
sftp服務器為了安全,更換了監聽端口,sftp客戶端連接服務器時報如下錯誤:
[root@iZ2zeezw67v09s8gw1zfotZ ~]# sftp abc@124.193.194.17 -p9022
ssh_exchange_identification: Connection closed by remote host
Couldn't read packet: Connection reset by peer
經過各種分析排查,發現h3c路由設備對sftp參數位置或參數大小寫敏感導致
通過以下命令,順利連接sftp服務器,問題解決。
[root@iZ2zeezw67v09s8gw1zfotZ ~]# sftp -P9022 abc@124.193.194.17
abc@124.193.194.17's password: