Changes
Jump to navigation
Jump to search
← Older edit
Newer edit →
Linux: SSH
(view source)
Revision as of 09:29, 4 March 2016
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 />
Rafahsolis
Bureaucrats
,
Administrators
2,306
edits
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
Variants
Views
Read
View source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
Special pages
Printable version