Seemless ssh through jumpboxes & bastion hosts
- Add the following to the top of your ssh config file found at
~/.ssh/config:
Host *
IgnoreUnknown JumpHost
Note: The
IgnoreUnknownoption can take multiple values using comma sperated values
- Add entries for the jumpboxes/bastion hosts. Minimum configuration needed is
HostnameandUser.
Example:
Host myJumpHost
Hostname 192.168.1.1
User admin
- Add the
JumpHostoption to the hosts that require a jumpbox for connections. This is the host that will receive an interactive shell.
Note: If the hosts entry does not exist, create it. Minimum configuration needed is
Hostname,UserandJumpHost.
Example:
Host myHost
Hostname 192.168.1.20
User admin
IdentityFile ~/.ssh/my_keyfile
JumpHost myJumpHost
- Connect with
jsshusing:/path/to/jssh myHost
Note: You can append
debugto the above command for debugging information. No other options are available at this time
jssh is prebuilt for Windows and Linux x86 machines. For Mac's and/or ARM based machines, build a standalone binary with:
git clone https://github.com/steveharsant/jssh
cd jssh
pip install -r requirements.txt
pyinstaller --onefile ./jssh.pyThe binary will be found in the ./dist directory once built.