From Maslab 2011
What does it mean when we say "SSH into your robot"? Say your eeePC reports an address of
126.96.36.1990. Just type
ssh firstname.lastname@example.org at an Athena prompt. You'll be prompted for the password, and then you can run remote commands on your robot.
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 email@example.com:/home/maslab
- SSH to the eeePC:
- On the eeePC, make a
.sshdirectory if it doesn't already exist:
- 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 firstname.lastname@example.org Athena, you should be logged in automatically with no password prompt.
To copy files to your robot, do
scp files email@example.com:/destination/directory. If passwordless login is configured,
scp will also use it.