Today, I practiced connecting from my Mac to my Ubuntu VirtualBox using SSH. I also tested basic file and directory operations to see how commands from Mac reflect in Ubuntu.
Steps I followed:
1. Configure VirtualBox Network
- Open VirtualBox, Select Ubuntu VM, Settings, Network
- Change network adapter from NAT to Bridged Adapter
- Selected Mac Wi-Fi interface and saved changes
2. Install SSH Server on Ubuntu
Update package list:
sudo apt update
Install OpenSSH server, started and enabling the service:
sudo apt install openssh-server
sudo systemctl start ssh
sudo systemctl enable ssh
3. Verify SSH service status
sudo systemctl status ssh
Check if running.
4. Ensure firewall allows SSH
sudo ufw allow ssh
sudo ufw status
This step is important to make sure the firewall doesnโt block incoming SSH connections.
5. Connect from Mac using Terminal
Get the IP Address first from ubuntu setup:
ip a
Mine is 192.168.100.153
In Mac Terminal:
ssh kerviejay@192.168.100.153
I entered my Ubuntu password and successfully accessed my Ubuntu machine remotely!
Today, I have learned that SSH allows me to connect from Mac to Ubuntu VM and run commands remotely. Using a Bridged Adapter gives the VM its own IP on the same network. I learned to check my username (whoami), current directory (pwd), and list files (ls) from SSH. Creating and removing directories and files from Mac reflects directly in Ubuntu. Ensuring the firewall allows SSH is crucial for successful connections. Making a file with a message confirms SSH connectivity, which makes practicing Linux more interesting.
Top comments (0)