Size: 764
Comment:
|
Size: 1083
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
<<TableOfContents(2)>> | |
Line 5: | Line 6: |
* ssh-keygen -t dsa # with empty password * cd ~/.ssh * cat id_dsa.pub # public key |
{{{#!highlight sh ssh-keygen -t dsa # with empty password cd ~/.ssh cat id_dsa.pub # public key }}} |
Line 10: | Line 13: |
* cd /home/userx/.ssh * vi authorized_keys # paste the id_dsa.pub (public key) content generated on the client * chmod 0600 authorized_keys |
{{{#!highlight sh mkdir -p ~/.ssh cd /home/userx/.ssh vi authorized_keys # paste the id_dsa.pub (public key) content generated on the client chmod 0600 authorized_keys }}} |
Line 19: | Line 24: |
{{{ | {{{#!highlight sh |
Line 25: | Line 30: |
{{{ | {{{#!highlight sh |
Line 30: | Line 35: |
== SSHFS == Ability to mount a user filesystem with FUSE on a remote SSH folder {{{#!highlight sh sudo apt install sshfs cd ~ mkdir remotesshfsfolder sshfs user@host.example.org:/home/user remotesshfsfolder/ }}} |
Contents
SSH
Generate local key to access remote host
On client:
On SSHserver:
Login from the client with ssh userx@remote.example.org should ask for not password. Useful to invoke commands remotely using ssh
Copy file to SSH server listening on different port
1 scp -P 2222 filex userx@sshserver.example.org:/home/userx
Add listening ports on Ubuntu
Edit file /etc/ssh/sshd_config to set port 22 and 1234
Restart service with service ssh restart
SSHFS
Ability to mount a user filesystem with FUSE on a remote SSH folder