commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
Of course you need to be able to access host A for this ;-)
There are 2 alternatives - vote for the best!
Unreachable_host is unavailable from local network, but it's available from reachable_host's network. This command creates a connection to unreachable_host through "hidden" connection to reachable_host.
This command uses the reachable_host as a proxy; redirecting your request to the unreachable_host.
The main advantage is that you need only one ssh key. You copy the public part to both servers and you can access the unreachable_host without a problem.
Also, you can put this on ~/.ssh/config to access the unreachable_host directly:
ProxyCommand ssh user@reachable_host -W %h:%p
and, then, just ssh user@unreachable_host.
If you can do better, submit your command here.
You must be signed in to comment.