SSH key authentication
From ImageStream Router Documentation
Setting up SSH Key Authentication
Setting up your Imagestream router to do SSH key based authentication takes about 10 minutes to setup, and requires some basic familiarity with your SSH terminal software. These instructions cover how to setup SSH Key authentication with both OpenSSH for Unix/Linux and PuTTY for Windows. Instructions for other SSH implementations will vary in creation of the key, but should be similar after that.
Steps for OpenSSH
- If you already completed this step, then skip to step 4. Generate the SSH Key by opening a terminal and running
- Save the file to the default location. NOTE: Write this down for later.
- Type in the passphrase. NOTE: This can be left blank, but it is considered less secure. Ssh-agent can be used to remember the passphrase, but its setup is outside the scope of this document.
- Login to your Imagestream router and select option 3. Advanced, then option 1. Bash shell
mkdir /root/.ssh/. Then run
chmod 700 /root/.ssh/
- On your workstation, run
scp <SSH_KEY_LOCATION>.pub root@<IP_OF_ROUTER>:/root/<code>
- On the router, run <code>cat /root/id_dsa.pub >> /root/.ssh/authorized_keys.
- Finally, run
rm /root/id_dsa.pub. Connecting to
ssh <IP_OF_ROUTER>should authenticate via the ssh key.
2.Steps for PuTTY 1.Download and install putty, pscp, and puttygen NOTE: You can obtain PuTTY from: http://www.chiark.greenend.org.uk/~sgtatham/putty/ 2.Open puttygen and click on Generate. 3.Move the mouse to generate random data 4.Click on save Private Key and save the file to %USERPROFILE%\putty_key.ppk 5.Highlight the public key data at the top of the puttygen window, and past it into a text editor. Save that file as %USERPROFILE%\putty_key.pub 6.Run this command at a shell. pscp %USERPROFILE%\putty_key.pub root@<IP_OF_ROUTER>:/root/ 7.Login to your Imagestream router and select option 3. Advanced, then option 1. Bash shell 8.On the router, run cat /root/putty_key.pub >> /root/.ssh/authorized_keys. 9.Run mkdir /root/.ssh/<enter>. Then run chmod 700 /root/.ssh/<enter> 10.Run putty, load the profile for the router, then go to Connection->SSH->Auth, and in the “Private Key file for Authentication” box, type in %USERPROFILE%\putty_key.ppk, then save the profile. 11.Finally, run rm /aroot/putty_key.pub. Connecting to ssh <IP_OF_ROUTER> should authenticate via the ssh key.