As a system administrator, you want to create shortcut while keeping your server secure. Running in a fully Linux environment you can alias commands to make things faster and that’s what this blog post is about; Creating an SSH Key, adding the ssh key into the server and adding an alias on your host to make a simple one-word shortcut to ssh into the server. SSH keys provide a more secure way of logging into a server with SSH than using just a password alone because the complexity of a password is generally not complex or long enough to be resistant to repeated, persistent attackers meaning with time can be brute forced. Generating public/private rsa ssh key pair by running - CLI: ssh-keygen

It will ask of you where you want to save the ssh key, it is usually /home/username/.ssh/id_rsa and for root /root/.ssh/id_rsa. The private key is usually stored as id_rsa and the associated public key will be called id_rsa.pub. Add a passphrase for this ssh key which adds a method of securing the ssh key from being used. The easiest way to copy your public key to an existing server is to use a utility called ssh-copy-id. Because of its simplicity, this method is recommended if available. Copying the SSH key to Server - CLI: ssh-copy-id root@hostname Creating an alias is as simple as running the alias command. An example of creating the alias is alias aliasname=‘commands’. To add an ssh alias, Adding alias to do the ssh automagically - CLI: echo “lede=’ssh root@lede’” » ~/.bash_profile source ~/.bash_profile Testing if the alias actually works: