Skip to content

Host alias

Setting up SSH host aliases

Note: This guide is for Linux/Unix based systems including Mac that use OpenSSH or similar ssh client. If you are using a Windows system, we recommend the official "Windows Subsystem for Linux" (WSL2) provided by Microsoft to create a linux system kernel and environment within Windows.

This will start with the basic configuration to tell your SSH client about specific hosts that you connect to. Different access parameters for each host can be independently specified here.

By default, your ssh configuration file for your profile on your local machine will likely be located at ~/.ssh/config. Edit this file using a text editor of your choice.

Set Up Host Aliases

Let's create some host aliases for the CCI landing pads so that we can simplify our initial ssh command. Let's say that your CCI username was EXPLname. Typically, you'd connect to a landing pad through ssh with a command like:

ssh EXPLname@blp01.ccni.rpi.edu

You could add the following lines to your ssh configuration file:

Host cci01
        HostName blp01.ccni.rpi.edu        
        User EXPLname


Host cci02
        HostName blp02.ccni.rpi.edu        
        User EXPLname


Host cci03
        HostName blp03.ccni.rpi.edu        
        User EXPLname

Host cci04
        HostName blp04.ccni.rpi.edu        
        User EXPLname

This would allow you to refer to specific landing pads by an alias (nickname) instead of a full address. It also will use the configured username to connect to the specified host so your ssh command to connect to a landing pad would now be:

ssh cci01

This also affects SCP commands, so if you wanted to transfer a file test.txt that existed in your local machines home directory, you could now transfer it to your barn (or anywhere else) with the following command:

scp ~/test.txt cci01:~/barn/

Note: This SSH configuration file is also normally where you could supply specific public-key identity files for passwordless access. However, CCI systems require two-factor authentication with each new SSH connection and has disabled public-key authentication for off-site connections. As such, generating and configuring these identity files is not documented here. There is, however, a way to create multiple connections using only one authentication...