SSH

From Things and Stuff Wiki
Revision as of 14:56, 13 June 2013 by Milk (talk | contribs) (→‎SSHFS)
Jump to navigation Jump to search


General

Server/client

Keys

Default file name format;

~/.ssh/id_rsa and ~/.ssh/id_rsa.pub
  RSA key
~/.ssh/identity and ~/.ssh/identity.pub
  DSA key (old)

Creating

ssh-keygen
  create a key. rsa is default.

Distributing

ssh-copy-id [-i [identity_file]] [user@]remote

ssh-copy-id username@remote-server.org

ssh-copy-id -i ~/.ssh/id_ecdsa.pub '-p 221 username@remote-server.org'

Multiple keys

ssh -i ~/.ssh/id_rsa_example.org

Config

~/.ssh/config

Host example.org
 IdentityFile ~/.ssh/id_rsa_example.org

to sort

randomart

VisualHostKey=yes

SCP

  • scp -P [port] file.txt user@remotehose:~/file.txt

When scp on remote is initiated, it done so with -t flag, which is undocumented but might be required for precise command persmission configuration.

SSHFS

sshfs user@address:/home/user/dir dirtomountto -p [port]

Security

Honeypot

X11 forwarding

Tools

To sort