--- layout: page category-title: Intermediate commands category-page: intermediate tags: author: Announ Marwan title: ssh ---

SSH

What is "SSH"!?


Are you searching for a program for executing commands on a machine remotely or simply logging into a remote machine?
Are you searching a program that provide you secure encryption communications between two host?
I have the solution, SSH.
SSH connects and logs you into a specified hostname, where the user have only to prove his identity to the remote machine.
Briefly The ssh command provides a secure connection between two hosts over a insecure network.

Example of using ssh

-Logging to a remote server(to login in a remote server from local host)

  localhost:[~]> ssh username@remote-server
  username@remote-server password:
  remote-server:[~]>

  

-Logging out from remote server(you can do easily "command+d")

  remote-server:[~]>exit
  logout
  Connection to remote-server closed.
  localhost:[~]>


  

-Running remote from local host

  localhost:[~]> ssh user@remote-host "ls test"
  online-backup.dat
  oracle-storage.bat
  unix-dedicated-server.txt

  

-Debugging ssh client(to debug and find the exact error without connection to the remote host)
  ssh -v user@remote-host
 OpenSSH_4.3p2, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
 debug1: Reading configuration data /etc/ssh/ssh_config
 debug1: Applying options for *
 debug1: Connecting to remote-host [172.22.200.140] port 22.
 debug1: Connection established.
 debug1: identity file /home/user/.ssh/identity type -1
 debug1: identity file /home/user/.ssh/id_rsa type -1
 debug1: identity file /home/user/.ssh/id_dsa type 2
 debug1: loaded 3 keys
 ..........

  

-Copying files between remote host and local
from remote

scp user@remote-host:/usr/local/bin/add.sh
  

from local
scp filename user@remote-host:/var/tmp/

Then, you can now connect and use svn like a programmer