
我有一台運行 openssh 的 archlinux 計算機,我可以毫無問題地在本地連接到它。但是,當我嘗試從另一個網路連接時,我收到錯誤。 SSH 正在偵聽連接埠 22,但我將路由器設定為將連接埠 25 連接埠轉送到 22,因為我有不只一台電腦設定為透過 ssh 進入連接埠 22。
使用膩子,I get Incoming packet was garbled on decryption
我嘗試將河豚移到頂部,並在“連接”>“SSH”>“密碼”中嘗試將 3DES 移到頂部。我使用的是膩子版本.64
使用 MobaXterm 我得到
Bad packet length 1349676916. Disconnecting: Packet corrupt
當我手動運行時
ssh username@ip -vp 25
OpenSSH_6.7p1, OpenSSL 1.0.1g 7 Apr 2014
debug1: Reading configuration data /etc/ssh_config
debug1: Connecting to MY-IP [MY-IP] port 25.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /home/mobaxterm/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/mobaxterm/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/mobaxterm/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/mobaxterm/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/mobaxterm/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/mobaxterm/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/mobaxterm/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/mobaxterm/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.7
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.0p1 Debian-4+deb7u2
debug1: match: OpenSSH_6.0p1 Debian-4+deb7u2 pat OpenSSH* compat 0x04000000
debug1: SSH2_MSG_KEXINIT sent
Bad packet length 1349676916.
Disconnecting: Packet corrupt
如果我在運行 ssh 時使用 -1 我得到
Protocol major versions differ: 1 vs. 2
據我了解,連接埠已正確轉送。我還用 telnet 連接並得到了
Trying MY-IP...
Connected to MY-IP.
Escape character is '^]'.
SSH-2.0-OpenSSH_6.0p1 Debian-4+deb7u2
我可以連接到網路上的其他機器,然後使用它們透過 ssh 連接到這台機器。另外兩台機器是樹莓派,我覺得嘗試使用它們作為接入點可能會導致延遲,所以如果可能的話我寧願修復這個問題。
答案1
似乎正在使用連接埠 35。切換到另一個連接埠並將其設定為靜態IP似乎已經解決了問題。