Score:0

Windows Terminal: "ssh: connect to host 12.3.4.56 port 22: Permission denied"

dz flag
Tug

I have an unused PC that I turned into a server for Minecraft. I installed Ubuntu Server 20.04.4 LTS and set it up.

I want to connect to my server with my Windows 10 PC using the Windows Terminal preferably, or PuTTY. It seemed to be as simple as installing OpenSSH Client and running the command ssh [email protected]. However, I immediately get an ssh: connect to host 12.3.4.56 port 22: Permission denied message.

So I installed PuTTY and tried. I received a Network error: Permission denied immediately after selecting open.

However, I am running Zorin OS on my laptop and I can get in the server with no problems.

All of my PCs are connected to the same network.

I have tried the following:

  • (Ubuntu Server) I changed the sshd-config file by uncommenting PermitRootLogin yes, PasswordAuthentication yes (per tutorials I found), and even changed the port number from 22 to something else (setting a ufw rule to allow, of course).
  • (Ubuntu Server) I set a rule to allow my Windows PC IP Address through the firewall.
  • (Ubuntu Server) I checked the service status of SSH, making sure Ubuntu and SSH were completely updated, restarted SSH, and created a root account and password as well.
  • (Ubuntu Server) I reinstalled OpenSSH.
  • (Ubuntu Server) I reset the firewall.
  • (Windows 10) I have the OpenSSH Client installed on my PC.
  • (Windows 10) I turned off my antivirus and firewall.
  • (Windows 10) I created inbound and outbound rules for port 22 via Windows Firewall.
  • (Network) I restarted my router.

Debug Log

C:\WINDOWS\system32>ssh -vvv [email protected]
OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2
debug3: Failed to open file:C:/Users/joshu/.ssh/config error:2
debug3: Failed to open file:C:/ProgramData/ssh/ssh_config error:2
debug2: resolve_canonicalize: hostname 12.3.4.56 is address
debug2: ssh_connect_direct
debug1: Connecting to 12.3.4.56 [12.3.4.56] port 22.
debug3: finish_connect - ERROR: async io completed with error: 10013, io:000001AF8F3FDFB0
debug1: connect to address 12.3.4.56 port 22: Permission denied
ssh: connect to host 12.3.4.56 port 22: Permission denied

My Ubuntu Server is using "OpenSSH_8.2p1 Ubuntu-4ubuntu0.4, OpenSSL 1.1.1f 31 Mar 2020".

I am at a loss of what to do from here. I am just wondering what I may be missing. I created a .ssh folder and .ssh folder since they were not there. I am not sure how to create a ssh_config file and what would I need to put in there for my Windows PC to securely connect to my server.

user535733 avatar
cn flag
Asking your favorite Search Engine for "putty error 10013" will point you toward the most likely causes.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.