Linux Administration presents a collection of common issues and useful tips for Linux system administration. Whether you’re new to system administration or have been maintaining systems for some time, we hope these tips are helpful regardless of your background or choice in Linux distributions.
I got quite a few servers where I login via SSH. As a Linux user, I feel tired typing more than few things at a time (not my fault!), so I decided to create SSH shortcuts and save it to my desktop. From then, all I needed to do is open that shortcut and just type in my password of tokenID depending on the server’s I am using. So, in this guide, I will demonstrate how to create SSH shortcut in Linux.
First go to Desktop (or where-ever you want to save these shortcuts) and create a file named production.desktop
.
blackmore@blackTOP:~/Desktop$ cd /home/blackmore/Desktop/ blackmore@blackTOP:~/Desktop$ blackmore@blackTOP:~/Desktop$ vi production.desktop
Copy paste the following codes in the file:
[Desktop Entry] Version=1.0 Name=My Server Comment=Login to Prod Exec=mate-terminal --disable-factory --sm-client-disable --class=MyServer -x ssh -t [email protected] StartupWMClass=MyServer Terminal=false X-MultipleArgs=false Type=Application Icon=utilities-terminal StartupNotify=true
The most important thing you need to change is the user and server name (FQDN) i.e.
[email protected]
to something like [email protected]
or [email protected]
etc. Depending on your Linux distro, you might also need to change Icon=utilities-terminal
as this name might not be same.
Save the file and then change the permission to the file:
blackmore@blackTOP:~/Desktop$ chmod -R +rwx production.desktop
You should see an ICON on your desktop with MyServer
name.
Right click-open or double-click both would fire up a SSH session to your server with username pre-filled waiting for your password/token/security code. Pretty neat!
On a side note, if you are trying to secure your servers, then perhaps use CSF Firewall and limit it by country code as shown in here. I’ve always found CSF to be better compared to Fail2Ban.