Sunday, March 8, 2015

unix - How do I connect to a server behind an socks5 proxy through SSH on mac/linux?

I am using the ssh to try to connect to a server behind on remote network. That server is behind a socks5 proxy on the same network. The port of the proxy server is 1080 and the ssh port is 22. However this fails. The debug says that connection is refused on port 22.



I thought it was necessary to install corkscrew so it installed it with homebrew and used this link as a reference: http://meinit.nl/ssh-through-a-proxy-from-your-apple-mac-os-x



debug1: Reading configuration data /Users/jason/.ssh/config
debug1: Applying options for XXX.XX.XX
debug1: Reading configuration data /etc/ssh_config

debug1: Executing proxy command: exec /usr/local/bin/corkscrew proxy.server 1080 XX.XXX.XX.XX 22
debug1: identity file /Users/jason/.ssh/identity type -1
debug1: permanently_drop_suid: 501
debug1: identity file /Users/jason/.ssh/id_rsa type 1
debug1: identity file /Users/jason/.ssh/id_dsa type 2

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...