Introduction to Linux Basics
January 14, 2020
File Transferring In Linux system
January 14, 2020
Show all

Linux On SSH

SSH stands for Secure Shell, SSH by default  port no. is 22 . It helps to user to connect with other interface or other operating system as well as server. (“In Networking ssh helps to connect with the router’s, Switches and hardware Firewall’s .)  SS

H is secure shell connection. One more thing “The user is working on windows operating system and want to connect the “Linux server” then user  needed ssh connection software like “Putty & kiity “ . These software provide interface to connect . .  When two user using 64bit operating system and want to connect  16bit system . But  64bit OS does not support 16 bit OS . Then SSH help here to connect with 16bit OS .


The ssh command provides a secure encrypted connection between two hosts over an insecure network. This connection can also be used for terminal access, file transfers, and for tunneling other applications. Graphical X11 applications can also be run securely over SSH from a remote location.


Linux typically uses the OpenSSH client. The ssh command to log into a remote machine is very simple. To log in to a remote computer called, type the following command at a shell prompt:


If this is the first time you use ssh to connect to this remote machine, you will see a message like:

The authenticity of host ‘’ cannot be established.DSA key fingerprint is 22:88:30:3f:b0:f3:4a:9b:01:9d:j3:a7:98:l2:31:9c.Are you sure you want to continue connecting (yes/no)?

Type yes to continue. This will add the server to your list of known hosts (~/.ssh/known_hosts) as seen in the following message:

Warning: Permanently added ‘’ (DSA) to the list of known hosts.

Each server has a host key, and the above question related to verifying and saving the host key, so that next time you connect to the server, it can verify that it actually is the same server.

Once the server connection has been established, the user is authenticated. Typically, it asks for a password. For some servers, you may be required to type in a one-time password generated by a special hardware token.

Once authentication has been accepted, you will be at the shell prompt for the remote machine.


It is also possible to use a different username at the remote machine by entering the command as:


The above can also be expressed with the syntax:

ssh -l alternative-username


The ssh command is often also used to remotely execute commands on the remote machine without logging in to a shell prompt. The syntax for this is:

ssh hostname command

For example, to execute the command:

ls /tmp/doc

on host, type the following command at a shell prompt:

After authenticating to the remote server, the contents of the remote directory will be displayed, and you will return to your local shell prompt. -x Disables X11 forwarding.


The ssh command reads its configuration from the SSH client configuration file ~/.ssh/config. For more information.


Command-line options can be used to set up port forwarding. Local fowarding means that a local port (at the client computer) is tunneled to an IP address and port from the server. Remote forwarding means that a remote port (at the server computer) is forwarded to a given IP address and port from the client machine.

OpenSSH also supports forwarding Unix domain sockets and IP packets from a tunnel device to establish a VPN (Virtual Private Network).


Some of the most important command-line options for the OpenSSH client are:

-1 Use protocol version 1 only.

-2 Use protocol version 2 only.

-4 Use IPv4 addresses only.

-6 Use IPv6 addresses only.

-A Enable forwarding of the authentication agent connection.

-a Disable forwarding of the authentication agent connection.

-C Use data compression

-c cipher_spec Selects the cipher specification for encrypting the session.

-D [bind_address:]port Dynamic application-level port forwarding. This allocates a socket to listen to port on the local side. When a connection is made to this port, the connection is forwarded over the secure channel, and the application protocol is then used to determine where to connect to from the remote machine.

-E log_file Append debug logs to log_file instead of standard error.

-F configfile Specifies a per-user configuration file. The default for the per-user configuration file is ~/.ssh/config.

-g Allows remote hosts to connect to local forwarded ports.

-i identity_file A file from which the identity key (private key) for public key authentication is read.

-J [user@]host[:port] Connect to the target host by first making a ssh connection to the pjump host[(/iam/jump-host) and then establishing a TCP forwarding to the ultimate destination from there.

-l login_name Specifies the user to log in as on the remote machine.

-p port Port to connect to on the remote host.

-q Quiet mode.

-V Display the version number.

-v Verbose mode.

-X Enables X11 forwardin

Leave a Reply

Your email address will not be published. Required fields are marked *