SSH Access to Ubuntu Using Command Prompt (CMD)
Objective
By the end of this lab, the student will be able to use the Windows Command
Prompt to establish an SSH connection to a remote or virtual Ubuntu machine.
Resources
1. Windows System: Command Prompt (pre-installed on Windows).
2. Ubuntu Virtual Machine or Remote Server:
o SSH server installed and enabled on Ubuntu.
o IP address or hostname of the Ubuntu system.
3. Network: Both systems must be on the same network or accessible over the
internet.
4. Credentials: Username and password for the Ubuntu system.
Instructions
Part 1: Preparing the Ubuntu System
1. Verify SSH Installation on Ubuntu:
o Open the terminal in your Ubuntu system.
o Check if the SSH server is installed by running: sudo systemctl status
ssh
o If SSH is not installed, install it using: sudo apt install openssh-server -y
o Ensure SSH is running and enabled with: sudo systemctl enable ssh &&
sudo systemctl start ssh
2. Find the IP Address of the Ubuntu Machine:
o In the Ubuntu terminal, run: ip a
o Note the IP address (e.g., 192.168.x.x) under the network interface
(usually eth0 or wlan0).
3. Configure the Firewall (if applicable):
o Ensure the SSH port (default: 22) is open: sudo ufw allow 22
Part 2: Accessing Ubuntu Using CMD
1. Open Command Prompt:
o Press Win + R, type cmd, and press Enter to open the Command
Prompt.
2. Check SSH Availability:
o Verify that SSH is available on your Windows system by typing: ssh
o If SSH is available, a list of SSH options will appear.
o If not, install OpenSSH Client on Windows by going to Settings >
Apps > Optional Features > Add a feature, search for "OpenSSH
Client," and install it.
3. Establish the SSH Connection:
o In the Command Prompt, type: ssh <username>@<IP address>
o Replace <username> with your Ubuntu username (e.g., user) and <IP
address> with the IP address of the Ubuntu machine (e.g.,
192.168.1.10).
o Example: ssh user@192.168.1.10
4. Authenticate the Connection:
o If prompted with a security alert about the host key, type yes to
proceed.
o Enter your Ubuntu password when prompted and press Enter.
5. Verify Access:
o Once logged in, you will see the Ubuntu terminal prompt.
o Test basic commands like ls or uname -a to confirm the connection.
Evaluation Rubric
Weig Achieved Not Achieved
Criteria
ht (✔) (✘)
SSH server verified and configured on Ubuntu 25% ✔ ✘
IP address correctly identified 15% ✔ ✘
Command Prompt SSH command configured
25% ✔ ✘
correctly
Successful SSH connection established 25% ✔ ✘
Weig Achieved Not Achieved
Criteria
ht (✔) (✘)
Basic commands executed on Ubuntu 10% ✔ ✘
Additional Notes
Ensure that both systems are on the same network or that port forwarding is
configured if accessing remotely.
Screenshots of the CMD output are mandatory for verification.
Document any challenges encountered and their solutions.