A while ago, I was lucky enough to receive one of Google’s cr-48 laptops to test out. I decided not to flip the switch to put it into developer mode (for several reasons). This meant that I was stuck with a rather locked-down terminal. Luckily, it had minimal ssh support, so I was able to connect to my other computer to run programs like irssi.
Recently, Google rolled out an update for Chrome OS. One of the changes contained in this update had to do with ssh. Now, simply running ‘ssh ‘ is not sufficient to connect. This will instead drop you into an ‘ssh>’ interactive prompt. At this prompt, you can simply type ‘connect’ to continue connecting. This interactive ssh program adds some additional functionality as well. Below is the output of the ‘help’ command.
connect - connect
dynamic-forward port - dynamic socks proxy (-D)
forward port:host:port - static port forward (-L)
help - this
host - remote hostname
key - sets private key to use (-i)
nocmd - don't execute command (-N)
port - port on remote host (-p)
quit - exit ssh subsystem
user - username on remote host
Note that this program can only bind local ports in the range
Those of you who have used the cr-48’s ssh client before probably took note of the addition of a ‘key’ option. This new feature means that users can finally use their cr-48 to connect to a computer via ssh using a key rather than a password. I have not found much documentation on using this new feature, so I figured I would document how I got it working.
First, I copied my ~/.ssh directory from my primary laptop (not my cr-48) to a web-accessible location. Then, from my cr-48, I proceeded to navigate to the key I wanted to use and download it (just use the default location). Next, I launched a terminal (Ctrl+Alt+T).
ssh> user nhandler
ssh> host somehost.com
ssh> key /home/chronos/user/Downloads/mykey
Assuming you followed these directions, you should get prompted for the password for the ssh key. Upon entering it, you will have an active ssh session to somehost.com.
This should help out many users who do not like to allow password logins for ssh.
Edit: I just realized that it is not necessary to enter the full path to the key. If you enter an incorrect path (such as trying to use ~ instead of /home/chronos), the following message is displayed:
File '~/user/Downloads/mykey' is not a valid key file. Key files must reside
under /media or /home/chronos/user. Key files in the Downloads directory may
be specified with an unqualified name.
As you can see, if the key is in /home/chronos/user/Downloads, you can drop the path and simply enter the key name.