我想反向到我的SunOS(Joyent)的隧道连接,以便在本地服务器上运行的本地开发服务器(localhost:8843)服务于此服务器上的任何连接。
编辑 :我不知道为什么,但没有正确格式化我的职位(该死)。 任何有经验的人请帮助编辑我的post
所以在这里我做什么:
在端口8843启动我的本地服务器
$ telnet localhost 8843
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
连接到服务器
$ ssh -vgR *:12043:0.0.0.0:8843 [email protected]
OpenSSH_5.2p1, OpenSSL 0.9.8l 5 Nov 2009 debug1: Reading configuration data /x/x/.ssh/config debug1: Reading configuration data /etc/ssh_config debug1: Connecting to myhost.com [xxxx] port 22. debug1: Connection established. debug1: identity file /x/x/.ssh/identity type -1 debug1: identity file /x/x/.ssh/id_rsa type 1 debug1: identity file /x/x/.ssh/id_dsa type 2 debug1: Remote protocol version 2.0, remote software version Sun_SSH_1.4 debug1: no match: Sun_SSH_1.4 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_5.2 debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: server->client aes128-ctr hmac-md5 none debug1: kex: client->server aes128-ctr hmac-md5 none debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP debug1: SSH2_MSG_KEX_DH_GEX_INIT sent debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY debug1: Host 'eastagile.com' is known and matches the RSA host key. debug1: Found key in /x/x/.ssh/known_hosts:65 debug1: ssh_rsa_verify: signature correct debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: SSH2_MSG_SERVICE_REQUEST sent debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: gssapi-keyex,gssapi-with-mic,publickey,password,keyboard-interactive debug1: Next authentication method: publickey debug1: Offering public key: eastagile5 debug1: Server accepts key: pkalg ssh-dss blen 433 debug1: Authentication succeeded (publickey). debug1: Remote connections from *:12043 forwarded to local address 0.0.0.0:8843 debug1: channel 0: new [client-session] debug1: Entering interactive session. debug1: remote forward success for: listen 12043, connect 0.0.0.0:8843 debug1: All remote forwarding requests processed Last login: Wed Mar 30 09:47:43 2011 from yyy
然后做一个检查
$ telnet myhost.com 12043
Trying xxxx..
telnet: connect to address xxxx: Connection refused
telnet: Unable to connect to remote host
尝试用您实际上希望连接转发到的IPreplace0.0.0.0。 例如:
ssh -vgR *:12043:localhost:8843 [email protected]
你有没有检查你的服务器sshd_config?
但是我一直没有和solaris一起工作
GatewayPorts yes
为了这个工作,在RHEL和派生的发行版(CentOS等…)