Managing SSH Sessions (Solar -PuTTY)

I have been wanting to setup something on my local machine to manage all my SSH sessions from one location. I generally am only on one computer managing various VM’s. I previously was running some PowerShell scripts just to open the session but I found Solar-PuTTY to be a good solution. Especially considering the fact that it is free!

This is the three sessions I currently have configured. All with a static assigned IP and key authentication only. For more information on how to do this you can head over to my other post explaining it in more detail.

For this instructional post I am going to play around with the format. Starting with the overall goal of what I am to discuss.

Goal: Understand how to save multiple SSH sessions for home-lab environment using Solar-PuTTY

By the end of this instructional discussion I hope for you to understand how to configure one or more SSH sessions within Solar-PuTTY.

1) Create new session

At the top left of the window you can click the three dots. Here you will find all the options for this application. Also with some easy shortcuts. Lets start with heading over to settings. You could just create new session but within the settings menu you will have all the options to better manage multiple sessions.

Upon opening the settings menu the sessions tab will open. Click Create new.

Pretty straight forward but I will explain each of them just in case. Session name will be the name displayed on overview page. IP or hostname will be the <ip.address> of the machine you are looking to SSH into. Port will be the port you are going to SSH into (default SSH port 22, change depending on your configuration). Type of connection will depend on your environment. Most likely it will be using SSHv2 format considering SSHv1 is not nearly as safe. If you select the wrong format and authenticate with a different format of key you will get an error.

The Use credentials option will allow you to load previously saved username and password. So if you have servers with the same username you can save that, and later on will just load those credentials here. Username/Password if not using stored credentials you will load them here. In the Private key section you will browse local computer for the private key that created the public keys for the servers. As mentioned earlier I have another discussion on this but I will briefly show you the option provided in Solar-PuTTY.

Click Generate certificate

It should open PuTTY Key Generator. Click Generate, move mouse on key area for randomness. Once the key is generated you will click Save private key. This will generate a .ppk file which should be stored in the .ssh directory in users home folder.

Going back to Solar-PuTTY, the .ppk file will be stored under the Private key option. Next is the Credentials name option. Here you can enter a custom name which will save the Username, Password and Private Key, allowing for importing to other sessions. If the server is only using key authentication you can leave Password blank.

Click Save.

From here you should be able to open up the session if all was configured correctly. This discussion was not created to cover the configuration of SSH but instead show you how to create/save session in Solar-PuTTY and what to look for.

2) Lessons Learned

I love Solar-PuTTY. Now that I have this running I can jump in at any time and manage my server/services.

  • Make sure Type of connection is configured correctly. Otherwise fatal error will happen and you will never get to login to your SSH session. What helped me get the process rolling was ensuring that SSH was properly configured using either Powershell or CMD. Once I was able to authenticate using one of those two options I knew that anything not working in Solar-PuTTY was because of an option I selected.
  • Always make sure you have a means to remote into these sessions. Especially when turning off password authentication. If these are local machines that you plan to SSH into and you some how botch up the keys or use the wrong format you will have to get physical access to the machine to fix it. For me since most of my services are currently running in ESXI I can just remote in via the web terminal and to my fixes there.
  • Select the right key format.

In the PuTTY key generator after either generating or loading the key you will want to copy the Public key for pasting into OpenSSH authorized_keys file. Otherwise key authentication will not work correctly.

  • Do not forget key passphrase. The key passphrase is just an extra measure of security for securing the private key. If you forget it you will have no choice but to create another one. I was able to remember mine eventually and then securely store it if I ever forgot again.

Conclusion

That will end todays instructional discussion for Solar-PuTTY. Super easy and super convenient. Now I have one location to manage all my servers and you should too. I hope it was a decent format for the information being discussed. There is not to many options here and most of it is straight forward so I do not foresee any issues.

My next discussion which I may write up later today will be super fun! I have a raspberry pi 3b+ I turned into a retro gaming console using Recalbox. One problem that I had was that I had to unplug/plug in every time in order to turn it off or on. Well after a week I decided I needed a button. The button will be configured using a python script using GPIO pins on the board itself! Well as always, Never Stop Learning!