• Home
  • Testing
  • SAP
  • Web
  • Must Learn!
  • Big Data
  • Live Projects
  • Blog

While working on a Linux operating system, you may need to communicate with other devices. For this, there are some basic utilities that you can make use of.

These utilities can help you communicate with:

  • networks,
  • other Linux systems
  • and remote users

So, let us learn them one by one.

Please be patient. The Video will load in some time. If you still face issue viewing video click here

SSH

SSH which stands for Secure Shell, It is used to connect to a remote computer securely. Compare to Telnet, SSH is secure wherein the client /server connection is authenticated using a digital certificate and passwords are encrypted. Hence it's widely used by system administrators to control remote Linux servers.

The syntax to log into a remote Linux machine using SSH is

SSH username@ip-address or hostname

Linux/Unix SSH, Ping, FTP, Telnet Communication Commands

Once you are logged in, you can execute any commands that you do in your terminal

Example:

ls

Linux/Unix SSH, Ping, FTP, Telnet Communication Commands

Example:

pwd

Linux/Unix SSH, Ping, FTP, Telnet Communication Commands

Ping

This utility is commonly used to check whether your connection to the server is healthy or not.This command is also used in -

  • Analyzing network and host connections
  • Tracking network performance and managing it
  • Testing hardware and software issues

Linux/Unix SSH, Ping, FTP, Telnet Communication Commands

Command Syntax:-

ping hostname="" or=""

Example :

ping 172.16.170.1

Linux/Unix SSH, Ping, FTP, Telnet Communication Commands

ping google.com

Linux/Unix SSH, Ping, FTP, Telnet Communication Commands

Here, A system has sent 64 bytes data packets to the IP Address (172.16.170.1) or the Hostname(www.google.com). If even one of data packets does not return or is lost, it would suggest an error in the connection. Usually, internet connectivity is checked using this method.

You may Press Ctrl + c to exit from the ping loop.

FTP

FTP is file transfer protocol. It's the most preferred protocol for data transfer amongst computers.

You can use FTP to -

  • Logging in and establishing a connection with a remote host
  • Upload and download files
  • Navigating through directories
  • Browsing contents of the directories

Linux/Unix SSH, Ping, FTP, Telnet Communication Commands

The syntax to establish an FTP connection to a remote host is -

ftp hostname="" or=""

Once you enter this command, it will ask you for authentication via username and password.

Linux/Unix SSH, Ping, FTP, Telnet Communication Commands

Once a connection is established, and you are logged in, you may use the following commands to perform different actions.

Command Function
dir Display files in the current directory of a remote computer
cd "dirname" change directory to "dirname" on a remote computer
put file upload 'file' from local to remote computer
get file Download 'file' from remote to local computer
quit Logout

Let us run some of the important commands.

Linux/Unix SSH, Ping, FTP, Telnet Communication Commands

Telnet

Telnet helps to -

  • connect to a remote Linux computer
  • run programs remotely and conduct administration

Linux/Unix SSH, Ping, FTP, Telnet Communication Commands

This utility is similar to the Remote Desktop feature found in Windows Machine.

The syntax for this utility is:

telnet hostname="" or=""
Example:
telnet localhost

For demonstration purpose, we will connect to your computer (localhost). The utility will ask your username and password.

Linux/Unix SSH, Ping, FTP, Telnet Communication Commands

Once authenticated, you can execute commands just like you have done so far, using the Terminal. The only difference is, if you are connected to a remote host, the commands will be executed on the remote machine, and not your local machine.

You may exit the telnet connection by entering the command 'logout'

Summary:

  • Communication between Linux/UNIX and other different computers, networks and remote users is possible.
  • The ping command checks whether the connection with a hostname or IP-address is working or not. Run 'ping IP address or Hostname' on the terminal
  • FTP is preferred protocol for sending and receiving large files. You can establish an FTP connection to a remote host and then use commands for uploading, downloading files, checking file and browsing them
  • Telnet utility helps you to connect to a remote Linux computer and work on it

 

YOU MIGHT LIKE: