Ssh connect through another host: Difference between revisions
Jump to navigation
Jump to search
(Created page with "=== The issue === I wanted to connect to a host through another host. And I wanted it as simple as possible to use. === The solution === Make sure sshd and netcat ([...") |
No edit summary |
||
Line 8: | Line 8: | ||
Host noc noc.mathpeter.net | Host noc noc.mathpeter.net | ||
Hostname | Hostname [TARGETHOST] | ||
User | User [USEROONTARGETHOST] | ||
ProxyCommand ssh | ProxyCommand ssh [PROXY-HOST-CAN-ALSO-BE-CONFIGURED-IN-.ssh/config] exec nc %h %p | ||
---- | ---- | ||
* See also: | * See also: | ||
[[ | ** [[Ssh automagically knocks at server door]] | ||
[[Category:Linux]] | [[Category:Linux]] |
Revision as of 13:17, 12 December 2018
The issue
I wanted to connect to a host through another host. And I wanted it as simple as possible to use.
The solution
Make sure sshd and netcat (nc) ist installed and set up on your server. (sshd on both, nc only on the "proxy")
Then add this to your .ssh/config:
Host noc noc.mathpeter.net
Hostname [TARGETHOST] User [USEROONTARGETHOST] ProxyCommand ssh [PROXY-HOST-CAN-ALSO-BE-CONFIGURED-IN-.ssh/config] exec nc %h %p
- See also: