Ssh

From Unix SME

Command name:

ssh

Description:

ssh (the Secure Shell) allows a user to remotely connect to a terminal or server remotely through a unix/linux shell. Assuming valid 
IP address or host address has been provided, ssh will create a virtual terminal session with the remote host. All data that is passed between the two connected computers is completely encrypted, hence the name `secure` shell. ssh also allows direct command execution on
a remote machine 

Syntax:

ssh [Destination] { [Command[Argument]] }

ssh [username]@[hostname or IP address]

ssh jayesh@10.143.90.2

ssh student@serverm

Use case:

 enter a login shell on a remote machine
 execute a command on a remote machine
 forward X11 graphical interface connections over the encrypted SSH
 

Examples:

 1. ssh nick@pima.edu # Start a login shell on Nick’s machine
 
 2. ssh rocky@pima.edu history # Read Rocky’s full shell history
 
 3. ssh ssh://boston@pima.edu:26 # See, Nick is forwarding the traditional port 22 to 26
 
 4: ssh remote.unixsme.org -p 35 " Standard form for specifying a unique port number to connect to."

 4. ssh-keygen   "This is for generating public-private keys." 
 5. ssh -1 user@host  "Forces ssh to use protocol SSH-1 only."
 6. ssh -2 user@host  "Forces ssh to use protocol SSH-2 only."  
 7. ssh -4 user@host  "Allows IPv4 addresses only."
 8. ssh -6 user@host  "Allows IPv6 addresses only."
 9. ssh -A user@host  "Authentication agent connection forwarding is enabled." 
 10. ssh -a user@host  "Authentication agent connection forwarding is disabled."
 11. ssh -C user@host  "Compresses all data (including stdin, stdout, stderr, and data for forwarded X11 and TCP connections) for a faster transfer of data."


See also:

 Why is the SSH port 22?