Miner.farm Crypto Currency Community Forum

Browse and post your favorite coin/crypto news, miner.farm and PiMP OS updates and announcements, mining guides, overclocking tips, and more...

Note: To change your forum username: login, click your avatar icon (top right?), Edit Profile. Change the "full name" field to your preferred username.

Quick Links

Using ~/.ssh/config file to simplify connecting to rigs using SSH

  • Staff

    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.

    Without config:

    ssh -i ~/.ssh/mycred1.id_rsa root@

    With config:

    ssh rig31

    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.

    Example .ssh/config:

    Host rig31
        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
        User root
        IdentityFile ~/.ssh/mycred1.id_rsa
    Host rig33
        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


Want 10% more hash from your rigs?

We promise to keep your email safe and never spam you.

© 2014-2021 Miner.farm | By Miners, For Miners | Portable Instant Mining Platform, LLC