Can't Connect PC via SSH: Troubleshooting Guide for Upgrading Windows 10 to 11
Are you having trouble with incoming SSH connections after upgrading your Windows 10 to 11? Don't worry - you're not alone. This article will help you identify and fix common issues related to SSH connectivity, ensuring that you can securely access your Windows 11 PC from remote locations.
1. Verify OpenSSH Server Status
First, make sure that the OpenSSH server is running. Press Win + X and select “Windows Terminal (Admin)” from the list. Run the following command to check the status of the OpenSSH server:
# systemctl status sshdIf the service is not running, start it using the following command:
# systemctl start sshd2. Check Firewall Settings
Check if the firewall allows incoming SSH connections. In the Windows Terminal, run the following command:
# netsh advfirewall firewall show rule name=OpenSSH-ServerEnsure that the rule profile is set to “Allow.” If not, update it with:
# netsh advfirewall firewall set rule name=OpenSSH-Server profile=private protocol=tcp localport=22 action=allow3. Edit SSHD Configuration
Modify the SSHD configuration to ensure that it accepts incoming connections. In the Windows Terminal, open the SSHD configuration file with:
# sudo nano /etc/ssh/sshd_configMake sure the following lines are uncommented and set as:
# What ports, IPs and protocols we listen for
Port 22
# Use these options to restrict which interfaces/addresses
ListenAddress 0.0.0.0
Save the changes and restart the OpenSSH server:
# systemctl restart sshd4. Reset SSH Keys
If your SSH keys are still not working, try resetting them. In the Windows Terminal, execute the following commands:
# sudo rm -f /etc/ssh/ssh\_host*\*
# sudo ssh-keygen -ARestart the SSHD service:
# systemctl restart sshd5. Disable Authentication Timeout
Disable “AuthenticationTimeOut” to prevent automatic disconnection. In the SSHD configuration file, add or update the following line:
AuthenticationTimeOut 06. Use a Third-Party SSH Client
If the issue persists, consider using a third-party SSH client. For example, PuTTY, MobaXterm, and Solar-PuTTY are popular SSH clients that you may find helpful.
- Verify OpenSSH Server Status
- Check Firewall Settings
- Edit SSHD Configuration
- Reset SSH Keys
- Disable Authentication Timeout
- Use a Third-Party SSH Client