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:
So, let us learn them one by one.
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
Example:
ls
Example:
pwd
This utility is commonly used to check whether your connection to the server is healthy or not.This command is also used in -
Command Syntax:-
ping hostname="" or=""
Example :
ping 172.16.170.1
ping google.com
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 -
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.
| 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.
Telnet helps to -
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'