Communication is the exchange and transfer of ideas, information or thoughts to express, inform or influence. In computers, communication is done by sending and receiving information in the form of data through networks.
In our laboratory session, we were introduced to the basic concepts behind data communications and networking.
We were able to connect to a remote computer or server using Secure Shell (SSH).
- Secure Shell is a network protocol for secured transactions or commands between computers connected to a network. This is a cryptographic protocol for secured data communications, remote command-line login and remote command execution.
We were also able to use traditional username-password combination and public-private keys to access the remote server, configure a passwordless login or account and to communicate with other users that were also connected to the remote server.
Below is the step by step procedure on our first exercise about the lessons discussed.
First, I created my own user account on my workstation with my user-password combination.
This can be done by executing the command:
$sudo adduser <username>
After that, I logged on to my account using the command $su <username>.
With my account on the remote server created by our instructor, I was able to connect to the remote computer with IP address "172.16.7.88"
With SSH and the connection between my workstation and the remote computer, I was able to perform commands and manage data on the remote computer. But in every command performed, I'm always ask for my password. To avoid that, I configured my computer for passwordless login.
I terminated my connection with the remote computer and access my ".ssh" directory in my home folder.
After that, I generated a public key using these commands:
$ssh-keygen -t rsa
$<enter>
$<enter>
$<enter>
Then, I copied the generated public key (id_rsa.pub) to my .ssh/authorized_keys folder on the remote computer.
This can be done by executing the commands:
$scp id_rsa.pub username@172.16.7.88:~/.ssh/authorized_keys
or
$ssh-copy-id username@172.16.7.88
This time, it did not ask for my password when I logged on to the remote computer.
There were several workstations connected to the remote computer. We are taught of ways on how to communicate to other workstations.
Before we can broadcast messages, we should make sure that mesg is set to yes.
The command $mesg should output "is y".
To broadcast a message, the we can use any of the following commands:
$wall <<< "Message"
$echo "Message" | wall
$wall [filename]
To send a message to a certain workstation/user only, we can use the write command.
I asked for my partner's username which is mjimarinay. Then I executed this command:
$write mjimarinay [enter]
$"message"
Problem Encountered:
- unstable network connection
After setting up passwordless login in my workstation to the remote computer, I was asked for the password when I used my passwordless login to other workstation.