Connect to remote host via ssh proxy

To connect to remote server via ssh proxy use can use the following sequence of commands:

# lsof -i :2222
# ssh -f proxy_user@proxy_host -L 2222:destination_host:22 -N
# ssh -p 2222 destination_user@localhost

If TCP port 2222 is free you will not see any output. So you can use it for SSH proxied connection.

proxy_user – SSH user on SSH proxy server proxy_host.

destination_host – IP or host name of remote server where should we connect using proxy_host server as SSH proxy.

destination_user – SSH user on destination_host server.

2 thoughts on “Connect to remote host via ssh proxy

  1. Thanks in favor of sharing such a good opinion, article is pleasant,
    thats why i have read it fully

  2. I like the valuable information you provide in
    your articles.

    I’ll bookmark your blog and check again here regularly.
    I am quite sure I’ll learn many new stuff right here!

    Best of luck for the next!

Comments are closed.