Changes

Jump to navigation Jump to search
309 bytes added ,  09:29, 4 March 2016
no edit summary
Line 14: Line 14:  
== Copy key to server ==
 
== Copy key to server ==
 
  ssh-copy-id -i path/to/key_name.pub user_name@host_name
 
  ssh-copy-id -i path/to/key_name.pub user_name@host_name
 +
If .pub is already uploaded to the server:
 +
cat filename.pub >> $HOME/.ssh/authorized_keys
 +
== If home directory is encrypted ==
 +
$ /sbin/umount.ecryptfs_private
 +
$ cd $HOME
 +
$ chmod 700 .
 +
$ mkdir -m 700 .ssh
 +
$ chmod 500 .
 +
$ echo $YOUR_REAL_PUBLIC_KEY > .ssh/authorized_keys
 +
$ /sbin/mount.ecryptfs_private
 
== ssh tunneling ==
 
== ssh tunneling ==
 
This is used for example to connect to a database on a server that has the database port closed but ssh port open.<br />
 
This is used for example to connect to a database on a server that has the database port closed but ssh port open.<br />

Navigation menu