Configure proxy for ssh

Install ncat

# For Debian 8
$ sudo apt-get install nmap

# For Debian 10
$ sudo apt install ncat

# For Redhat based OS
$ sudo yum install nmap-ncat
# or
$ sudo dnf install nmap-ncat

Add ncat config to ~/.ssh/config (create if not exist)

# On Debian based OS
Host <destination-host>
    ProxyCommand    ncat --proxy <proxy_host>:<proxy_port> --proxy-auth <username>:<password> %h %p

# On Redhat based OS
Host <destination-host>
    ProxyCommand    nc --proxy <proxy_host>:<proxy_port> --proxy-auth <username>:<password> %h %p

Ignore --proxy-auth <username>:<password> if proxy does not require authentication.

ssh  proxy 

See also

comments powered by Disqus