Linux Commands Net
Linux Commands Net
Communication Commands
ssh stands for “Secure Shell”. It is a protocol used to securely connect to a remote
server/system. ssh is secure in the sense that it transfers the data in encrypted form
between the host and the client. It transfers inputs from the client to the host and relays
back the output. ssh runs at TCP/IP port 22.
SSH is significantly more secure than the other protocols such as telnet because of the
encryption of the data. There are three major encryption techniques used by SSH:
Symmetrical encryption: This encryption works on the principle of the generation of
a single key for encrypting as well as decrypting the data. The secret key generated is
distributed among the clients and the hosts for a secure connection. Symmetrical
encryption is the most basic encryption and performs best when data is encrypted and
decrypted on a single machine.
Asymmetrical encryption: This encryption is more secure because it generates two
different keys: Public and Private key. A public key is distributed to different host
machines while the private key is kept securely on the client machine. A secure
connection is established using this public-private key pair.
Hashing: One-way hashing is an authentication technique which ensures that the
received data is unaltered and comes from a genuine sender. A hash function is used
to generate a hash code from the data. It is impossible to regenerate the data from the
hash value. The hash value is calculated at the sender as well as the receiver’s end. If
the hash values match, the data is authentic.
Ping
This utility is commonly used to check whether your connection to the server is
healthy or not.This command is also used in –
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.
FTP
FTP is file transfer protocol. It’s the most preferred protocol for data
transfer amongst computers.
ftp [IP]
ftp 192.168.100.9
Entering the required credentials logs you in and starts the FTP interface. In this example, we are
logging in as the phoenixnap user:
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
Telnet helps to –
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’