ɐɥO to PythonEnglish • 8 months agoI created a shitty Python script to manage multiple SSH connections because I couldnt find a decent onegit.ohaa.xyzexternal-linkmessage-square4fedilinkarrow-up123arrow-down16cross-posted to: [email protected]
arrow-up117arrow-down1external-linkI created a shitty Python script to manage multiple SSH connections because I couldnt find a decent onegit.ohaa.xyzɐɥO to PythonEnglish • 8 months agomessage-square4fedilinkcross-posted to: [email protected]
minus-square@__init__link2•8 months agoThe “host” is just your friendly name for the connection, not necessarily the hostname of the remote host. You can specify the same username or hostname as many times as you want. My config is made up of mostly blocks like this: Host server1 HostName server1.you.com User your_ssh_username IdentityFile ~/.ssh/yourprivatekey.pem Host server2 HostName server2.you.com User your_ssh_username IdentityFile ~/.ssh/yourprivatekey.pem
The “host” is just your friendly name for the connection, not necessarily the hostname of the remote host. You can specify the same username or hostname as many times as you want. My config is made up of mostly blocks like this:
Host server1 HostName server1.you.com User your_ssh_username IdentityFile ~/.ssh/yourprivatekey.pem Host server2 HostName server2.you.com User your_ssh_username IdentityFile ~/.ssh/yourprivatekey.pem