SSH

From Things and Stuff Wiki
Revision as of 04:28, 13 November 2012 by Milk (talk | contribs) (→‎SSH keys)
Jump to navigation Jump to search


General

SSH keys

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

Basic key setup:

ssh-keygen -t rsa
ssh-copy-id [-i [identity_file]] [user@]remote
  default identity_file is ~/.ssh/id_rsa.pub
ssh -i ~/.ssh/id_rsa_example.org

~/.ssh/config

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

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

Rsync

  • rsync is a software application and network protocol for Unix-like systems with ports to Windows that synchronizes files and directories from one location to another while minimizing data transfer by using delta encoding when appropriate. Quoting the official website: "rsync is a file transfer program for Unix systems. rsync uses the 'rsync algorithm' which provides a very fast method for bringing remote files into sync." An important feature of rsync not found in most similar programs/protocols is that the mirroring takes place with only one transmission in each direction. rsync can copy or display directory contents and copy files, optionally using compression and recursion.
--rsh='ssh -p8023'
  flag for non-standard ssh port

Security

X11 forwarding

Tools

To sort