- هذا الموضوع فارغ.
- Post
-
- ديسمبر 13, 2024 الساعة 10:29 ص
Weekend Wikiمدير عامTo enable SSH access to an Ubuntu machine using PuTTY, follow these steps:
Step 1: Install SSH Server on Ubuntu
- Open Terminal on your Ubuntu machine.
- Run the following commands to update the package list and install the SSH server:
sudo apt update sudo apt install openssh-server -y - Check the SSH service status to ensure it’s running:
sudo systemctl status ssh- If it’s not running, start and enable it:
sudo systemctl start ssh sudo systemctl enable ssh
- If it’s not running, start and enable it:
Step 2: Get the Ubuntu Machine’s IP Address
- Use the following command to find the IP address of your Ubuntu machine:
ip aLook for the IP address associated with your network interface (e.g.,
eth0orwlan0).
Step 3: Configure Firewall (if applicable)
- If you are using
ufw(Uncomplicated Firewall), allow SSH through the firewall:sudo ufw allow ssh sudo ufw enableVerify the rules:
sudo ufw status
Step 4: Download and Configure PuTTY
- Download PuTTY from the official website.
- Open PuTTY and configure the session:
- Host Name (or IP Address): Enter the Ubuntu machine’s IP address.
- Port: Ensure it is
22(default SSH port). - Connection Type: Select
SSH.
- Save the session configuration for future use.
Step 5: Connect to Ubuntu Using PuTTY
- Click Open in PuTTY.
- A terminal window will open. If prompted with a security alert about the server’s host key, click Yes.
- Log in using your Ubuntu username and password.
Optional: Configure SSH for Enhanced Security
- Edit the SSH configuration file:
sudo nano /etc/ssh/sshd_config - To improve security:
- Disable root login: Change
PermitRootLogin yestoPermitRootLogin no. - Allow specific users: Add
AllowUsers yourusername. - Change the default SSH port: Modify
Port 22to a custom port, e.g.,Port 2222.
- Disable root login: Change
- Restart the SSH service:
sudo systemctl restart ssh
Now you should be able to access your Ubuntu machine securely using PuTTY!
If still you’re not able to do so, connect with us at [email protected]
- يجب تسجيل الدخول للرد على هذا الموضوع.