Linux Networking Practical Report
Linux Networking Practical Report
Command:
ifconfig
Look for interfaces like eth0, enp0s3, wlan0. Interfaces showing an inet IP are active.
Commands:
sudo ifconfig eth0 192.168.1.100 netmask 255.255.255.0 up
sudo ifconfig eth0 down
sudo ifconfig eth0 hw ether 00:42:42:42:42:42
sudo ifconfig eth0 up
Verify:
ifconfig eth0
Commands:
sudo apt update
sudo apt install openssh-server -y
sudo systemctl enable ssh
sudo systemctl start ssh
sudo systemctl status ssh
Commands:
sudo ufw allow 22/tcp
sudo ufw enable
sudo ufw status
Command:
sudo nano /etc/ssh/sshd_config
Ensure the following lines are present and not commented out:
PermitRootLogin yes
PubkeyAuthentication yes
PasswordAuthentication yes
UsePAM yes
Linux Networking and SSH Practical Report
Restart SSH:
sudo systemctl restart ssh
Steps:
1. Open PuTTY.
2. Enter the Ubuntu server's IP address, port 22, and choose SSH.
3. Login with username and password.
4. Run: touch ~/ssh.txt
Steps:
1. Download pscp.exe from PuTTY's website.
2. Open CMD on Windows.
3. Navigate to the folder containing pscp.exe and transfer.txt.
Command:
pscp transfer.txt [email protected]:/home/username/
(Replace username and IP as needed)