SSH Tricks

How to use ssh client with a proxy-server on Linux?
1. Check if you have ssh client installed.
which ssh
Most distro should have ssh client installed by default.
2. Install connect-proxy
apt-get install connect-proxy
3. Create ~/.ssh/config and use the following template to add an entry for your host.
Host host_name_alias
Hostname host_name
ProxyCommand connect-proxy -S proxy_user@proxy_server:proxy_port %h 22
4. ssh user_name@host_name

How to use ssh client with a proxy-server on Solaris 10?
/bin/ssh -o ‘ProxyCommand=/usr/lib/ssh/ssh-socks5-proxy-connect -h proxy_server -p proxy_port host_name 22’ host_name -l user_name

Note: change “proxy_user“, “proxy_server“, “proxy_port“, “user_name“, “host_name_alias“, and “host_name” with the appropariate value for your environment.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s