SSH
From Maslab 2011
What does it mean when we say "SSH into your robot"? Say your eeePC reports an address of 18.111.0.300
. Just type ssh maslab@18.111.0.300
at an Athena prompt. You'll be prompted for the password, and then you can run remote commands on your robot.
Passwordless login
To set up passwordless login (which you'll need unless you want to type your password every time you do ant upload
), do this:
- On Athena, do
ssh-keygen -t rsa
. When you're prompted for a file name, accept the default. Leave a blank password. - Copy your public key to the eeePC like this (use your robot's correct IP address):
scp ~/.ssh/id_rsa.pub maslab@18.111.0.300:/home/maslab
- SSH to the eeePC:
ssh maslab@18.111.0.300
- On the eeePC, make a
.ssh
directory if it doesn't already exist:mkdir .ssh
- Set restrictive permission on it (SSH requires this):
chmod 700 .ssh
- Add your public key to the authorized keys file:
cat id_rsa.pub >>.ssh/authorized_keys2
- Set restrictive permission on this file, too:
chmod 600 .ssh/authorized_keys2
- Now when you type
ssh maslab@18.111.0.300
on Athena, you should be logged in automatically with no password prompt.
Copying files
To copy files to your robot, do scp files maslab@18.111.0.300:/destination/directory
. If passwordless login is configured, scp
will also use it.