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:
- other Linux systems
- and remote users
So, let us learn them one by one.
Click here if the video is not accessible
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
Once you are logged in, you can execute any commands that you do in your terminal
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
ping hostname="" or=""
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 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
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.
Once a connection is established, and you are logged in, you may use the following commands to perform different actions.
|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|
Let us run some of the important commands.
Telnet helps to -
- connect to a remote Linux computer
- run programs remotely and conduct administration
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.
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'
- 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