Welcome to the PiMP OS and Miner.farm forum.
Using ~/.ssh/config file to simplify connecting to rigs using SSH
SSH command line access made easier:
It can be quite cumbersome when you have a lot of rigs to log into. You can use a program like MobaXterm or PuTTy to save sessions, or you can use ssh's built-in configuration file to do so.
What most miners don't seem to know is that SSH can use a configuration file in ~/.ssh/config to create an alias of sorts for SSH hosts. If you use aliases in Bash then you can think of this as an alias for creating an SSH connection to a server or mining rig.
ssh -i ~/.ssh/mycred1.id_rsa firstname.lastname@example.org
By using the ~/.ssh/config file, it no longer becomes necessary to provide all of the connection parameters every time you want to connect. All information needed to connect to a host can just be defined in a host entry inside the config file.
Host rig31 Hostname 192.168.1.31 User root IdentityFile ~/.ssh/mycred1.id_rsa Another side benefit to this is that you also automatically have a document of all SSH servers you can connect to. No need to maintain an easily outdated spreadsheet which has to be updated separately. Host rig32 Hostname 192.168.1.32 User root IdentityFile ~/.ssh/mycred1.id_rsa Host rig33 Hostname 192.168.1.33 User root IdentityFile ~/.ssh/mycred1.id_rsa
If you have multiple people managing rigs, you can share this file with them. This can help standardize access by having it in version control (like Github) which will help have an audit trail, easier to maintain than having multiple files on one's PC & an indirect backup.
Also nice to know for the configuration is that you can specify options that are common for some or most hosts, like X forwarding, agent forwarding, etc..
If you sometimes need to route through a different server, you can also specify these in the config file.
Another method is to sign up with something like userify which works right off your rsa id.
Credits: Czar Pino
We promise to keep your email safe and never spam you.
Copyright (c) 2012-2018 PiMP LLC. All rights Reserved.