| 148 | |
| 149 | === Simplify the ssh command === |
| 150 | If you don't want to always specify the '-i' command when you try to login to your hosts, then you can modify your ssh config file to use your key by default. The default location for your ssh configuration file is at `~/.ssh/config`. For more information on the ssh configuration files use `man ssh_config`. If you want to setup your configuration so that it affects only your current hosts then you can add these lines to your configuration file for each host : |
| 151 | {{{ |
| 152 | Host <your_alias> |
| 153 | Port <port> |
| 154 | HostName <hostname> |
| 155 | User <username> |
| 156 | IdentityFile <private_key_location> |
| 157 | }}} |
| 158 | |
| 159 | Now you can simply run `ssh <your_alias>`, where <your_alias> can be any nickname you choose. In this |
| 160 | |
| 161 | This way requires you to add an entry for each host you have, given that the hosts that you reserve each time won't necessarily be the same, this process might end up being tedious and create a very big configuration file. Another way is to add your IdentityFile as a global parameter so it is used as an authentication method when trying to login to any host. Add these lines on the top of your ssh configuration file: |
| 162 | {{{ |
| 163 | IdentityFile ~/.ssh/id_rsa |
| 164 | IdentityFile <private_key_location> |
| 165 | }}} |
| 166 | The downside with this approach is that now this change affects your authorization to all nodes, not only GENI ones. |