Logging in via Jump Host with i2cssh

mac
2020-08-21 17:19 (4 years ago) ytyng

i2cssh is a tool that allows you to log in to multiple servers simultaneously in iTerm2, arranging SSH panes automatically for simultaneous operations.

https://github.com/wouterdebie/i2cssh

To log in to multiple target servers via the same bastion host, you can use:

i2cssh -Xt=user@bastion.example.com "ssh user@server1.example.com" "ssh user@server2.example.com"

like this.

If you are using Python Fabric, you can do it like this:

if getattr(env, 'gateway'):
local('i2cssh -Xt={} {}'.format(
env.gateway,
' '.join('"ssh {}@{}"'.format(env.user, h)
for h in env.hosts)))

It looks something like this.

Currently unrated

Comments

Archive

2025
2024
2023
2022
2021
2020
2019
2018
2017
2016
2015
2014
2013
2012
2011