linux – 远程主机关闭SSH连接

我有问题连接SSH到远程主机,但只在我的家庭网络(提供商).如果我在另一个网络(我在同一个城市的朋友 – 不同的提供商),连接工作完美. Ping到服务器(在我家)工作.这个问题我只有这个服务器.如果我尝试从家庭网络连接到其他主机,它可以工作.我该怎么办?

nich@ubuntu:/etc$ssh -vvv xxx@www.sci.muni.cz
OpenSSH_5.9p1 Debian-5ubuntu1,OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to www.sci.muni.cz [147.251.24.3] port 22.
debug1: Connection established.
debug1: identity file /home/nich/.ssh/id_rsa type -1
debug1: identity file /home/nich/.ssh/id_rsa-cert type -1
debug1: identity file /home/nich/.ssh/id_dsa type -1
debug1: identity file /home/nich/.ssh/id_dsa-cert type -1
debug1: identity file /home/nich/.ssh/id_ecdsa type -1
debug1: identity file /home/nich/.ssh/id_ecdsa-cert type -1
ssh_exchange_identification: Connection closed by remote host

nich@ubuntu:/etc$lsb_release -a
No LSB modules are available.
distributor ID: Ubuntu
Description:    Ubuntu 12.04.2 LTS
Release:        12.04
Codename:       precise

解决方法

以下是您可以尝试创建隧道的方法.

>中介是您信任的为您转发的机器
> remote是你想要的机器

ssh -N -L 20000:remote:22 user@intermediary

执行此操作后,本地计算机将侦听端口20000.当您使用ssh连接到此端口时,在您的主机上,连接将通过隧道转发给中间人,后者又将其转发到远程端口.

相关文章

在Linux系统中,设置ARP防火墙可以通过多种方法实现,包括使...
在Linux环境下,使用Jack2进行编译时,可以采取以下策略来提...
`getid`命令在Linux系统中用于获取当前进程的有效用户ID(EU...
在Linux环境下,codesign工具用于对代码进行签名,以确保其完...
Linux中的`tr`命令,其英文全称是“transform”,即转换的意...
Linux中的ARP防火墙是一种用于防止ARP欺骗攻击的安全措施,它...