EWS is University of Illinois’ engineering workstations, which are used for classes and testing project code.

Unfortunately, I have to connect to EWS for many of my classes. Since typing in my credentials after every ssh [server] became tedious (I’m lazy when it comes to typing), I shortened my workflow so that I am now able to type a single command - ews - to login and connect to my EWS server.

Connecting to EWS through SSH

SSH Public Key

To this, I added an SSH public key onto the EWS server, so that it would recognize me and skip the user authentication step (typing in your credentials).

First, move into the ssh directory with cd ~/.ssh.

Then, if you don’t already have an SSH key, you can create one with ssh-keygen -t ecdsa -b 521. This will create a public SSH key and put it in your SSH folder.

After, you want to copy the public portion of the key onto the server. You can do this with

ssh-copy-id -i ~/.ssh/id_ecdsa.pub [username]@[server]

After this, whenever you run the ssh command into the server, then it won’t ask you for your username and password for the server.

Aliasing the Command

Now, instead of running the lofty command of ssh [server], we can shorten this command to ews. In your shell configuration file (typically .bashrc or .zshrc), add the following line

alias ews="ssh [email protected]"

Now whenever you run the ews command, internally your shell will run the entire ssh command and connect!