SSH

From Torben's Wiki

see [1] [2]

SSH password-free-login

all in 1 go (exceute on ssh client machine)

ssh-copy-id user@remotehost

On the ssh-client machine

Use ssh-keygen to create private and public keys in the folder ~/.ssh/

ssh-keygen -t rsa

or

ssh-keygen -t rsa -C "email@host.com"
# ( or -t dsa )

passphrase can be empty The public key is in the file ~/.ssh/id_rsa.pub

adding or changing passphrase

ssh-keygen -p

storing passphrase of client via ssh-agent (linux)

ssh-agent bash
ssh-add

On the ssh server machine

  • append your public key to ~/.ssh/authorized_keys (you may have to create this file)
  • set that files permissions to 0640
  • set .ssh/ permissions to 0640


Mount using ssh

apt-get install sshfs

now you can run

/usr/bin/sshfs -o idmap=user server:/home/USER /mount/DIR

The option idmap=user is important to map the servers and clients user id

(this does not work from fstab...)