Jump to content

Windows server core ssh problem

Hello, I'm quite new in this topic. I have installed Windows Server standart 2019 core, and I have tried to add rules to firewall using cmd and sshd services through Powershell by following countless totorials on youtube. It seems I have succeded, BUT I can't connect to my server the normal way (using cmd command "ssh administrator@"Myipv4adress"", or using Putty), I only can connect to my server through my android phone, which is quite strange. Also I have checked if OpenSSH client is installed on my other windows pc.

Link to comment
Share on other sites

Link to post
Share on other sites

22 minutes ago, NavikPablo said:

Hello, I'm quite new in this topic. I have installed Windows Server standart 2019 core, and I have tried to add rules to firewall using cmd and sshd services through Powershell by following countless totorials on youtube. It seems I have succeded, BUT I can't connect to my server the normal way (using cmd command "ssh administrator@"Myipv4adress"", or using Putty), I only can connect to my server through my android phone, which is quite strange. Also I have checked if OpenSSH client is installed on my other windows pc.

Did you forward port 22 in your router to the IP adress of the server?

Main PC:

CPU: AMD Ryzen 5 5600X | RAM:Corsair LPX 3200 mhz (16Gb) 

Mobo:ASUS Strix B550-F Wifi | GPU: MSI RTX 2070 Gaming Z

Case: Sharkoon Nightshark RGB| Storage: 500 GB 970 EVO Plus 1 TB WD blue 500 GB Samsung HDD

Monitor: iiyama G-Master G2470HSU-B1 165Hz

Powersupply: Be Quiet straight Power 10 500 watt

 

 

Main Laptop

CPU: AMD Ryzen 7 4800H | RAM: Team group 16 GB 2666 mhz

GPU: RTX 2060 (MXM swappable)

Monitor: 1080p 120Hz

Storage: 2x 1 TB Samsung 970 EVO NVMe (no raid)

 

 

Second Laptop

CPU: Intel Core I5 1235u,  RAM: Samsung 8 GB 3200 mhz

GPU: IrisXe 80 eu

Storage: 512 GB WD Digital SN530 NVMe

 

Phone:

Xiaomi MI 11

 

Work Phone:

Galaxy A50

 

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Wolly9102 said:

Did you forward port 22 in your router to the IP adress of the server?

Yes, ofcourse

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, NavikPablo said:

Yes, ofcourse

What's the error you're getting?

Main PC:

CPU: AMD Ryzen 5 5600X | RAM:Corsair LPX 3200 mhz (16Gb) 

Mobo:ASUS Strix B550-F Wifi | GPU: MSI RTX 2070 Gaming Z

Case: Sharkoon Nightshark RGB| Storage: 500 GB 970 EVO Plus 1 TB WD blue 500 GB Samsung HDD

Monitor: iiyama G-Master G2470HSU-B1 165Hz

Powersupply: Be Quiet straight Power 10 500 watt

 

 

Main Laptop

CPU: AMD Ryzen 7 4800H | RAM: Team group 16 GB 2666 mhz

GPU: RTX 2060 (MXM swappable)

Monitor: 1080p 120Hz

Storage: 2x 1 TB Samsung 970 EVO NVMe (no raid)

 

 

Second Laptop

CPU: Intel Core I5 1235u,  RAM: Samsung 8 GB 3200 mhz

GPU: IrisXe 80 eu

Storage: 512 GB WD Digital SN530 NVMe

 

Phone:

Xiaomi MI 11

 

Work Phone:

Galaxy A50

 

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Wolly9102 said:

What's the error you're getting?

ssh: connect to host 192.168.1.69 port 22: Connection timed out

Link to comment
Share on other sites

Link to post
Share on other sites

16 minutes ago, NavikPablo said:

ssh: connect to host 192.168.1.69 port 22: Connection timed out

Try telnet on a windows machine to that ip adress. Seems like it's still blocked somewhere

Main PC:

CPU: AMD Ryzen 5 5600X | RAM:Corsair LPX 3200 mhz (16Gb) 

Mobo:ASUS Strix B550-F Wifi | GPU: MSI RTX 2070 Gaming Z

Case: Sharkoon Nightshark RGB| Storage: 500 GB 970 EVO Plus 1 TB WD blue 500 GB Samsung HDD

Monitor: iiyama G-Master G2470HSU-B1 165Hz

Powersupply: Be Quiet straight Power 10 500 watt

 

 

Main Laptop

CPU: AMD Ryzen 7 4800H | RAM: Team group 16 GB 2666 mhz

GPU: RTX 2060 (MXM swappable)

Monitor: 1080p 120Hz

Storage: 2x 1 TB Samsung 970 EVO NVMe (no raid)

 

 

Second Laptop

CPU: Intel Core I5 1235u,  RAM: Samsung 8 GB 3200 mhz

GPU: IrisXe 80 eu

Storage: 512 GB WD Digital SN530 NVMe

 

Phone:

Xiaomi MI 11

 

Work Phone:

Galaxy A50

 

Link to comment
Share on other sites

Link to post
Share on other sites

37 minutes ago, Wolly9102 said:

Try telnet on a windows machine to that ip adress. Seems like it's still blocked somewhere

"Could not open connection to the host, on port 22:"  Connect failed. Maybe you could point me to the right step by step guide? In case I have missed something.

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, NavikPablo said:

"Could not open connection to the host, on port 22:"  Connect failed. Maybe you could point me to the right step by step guide? In case I have missed something.

Have you completed the broad steps in this guide? SSH on Windows Server 2019 - Microsoft Tech Community 

 

You may use a different version of Windows, unfortunately I don't know much about Windows but you might have to either:

  • Install an openSSH Daemon on your Windows server
  • Allow OpenSSH through the Firewall.

 

Telnet is generally something people use to test if a port is open, you need to ensure that you telnet to port 22 though because that will test the port. Note - do not actually use Telnet for administration, just for testing port connectivity

 

If it's not open, run netstat on the server by executing the below command within an administrative CMD prompt:

netstat -p TCP -a -b | findstr "22"

That will just filter all the netstat output to show TCP connections for Port 22.  You'll be looking for a line that shows your computer is LISTENING on Port 22. 

 

Once you've allowed SSH through the Windows Firewall you should be able to connect via an OpenSSH Client.  

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

50 minutes ago, Akolyte said:

Have you completed the broad steps in this guide? SSH on Windows Server 2019 - Microsoft Tech Community 

 

You may use a different version of Windows, unfortunately I don't know much about Windows but you might have to either:

  • Install an openSSH Daemon on your Windows server
  • Allow OpenSSH through the Firewall.

 

Telnet is generally something people use to test if a port is open, you need to ensure that you telnet to port 22 though because that will test the port. Note - do not actually use Telnet for administration, just for testing port connectivity

 

If it's not open, run netstat on the server by executing the below command within an administrative CMD prompt:



netstat -p TCP -a -b | findstr "22"

That will just filter all the netstat output to show TCP connections for Port 22.  You'll be looking for a line that shows your computer is LISTENING on Port 22. 

 

Once you've allowed SSH through the Windows Firewall you should be able to connect via an OpenSSH Client.  

I did everything in the guide again, but still it doesn't solve the issue. I have tried netstat command and I have got something like this:

TCP 0.0.0.0:22     WIN-5L9MDF9HL08:0 LISTENING

TCP 192.168.1.69:49676    40.125.122.151:https TIME_WAIT

 

And when I'm connected with my phone I get this:

TCP 0.0.0.0:22     WIN-5L9MDF9HL08:0 LISTENING

TCP 192.168.1.69:22    RedmiNote8Pro0RedmiN:50189 ESTABLISHED

Link to comment
Share on other sites

Link to post
Share on other sites

On 1/16/2021 at 12:08 AM, NavikPablo said:

I did everything in the guide again, but still it doesn't solve the issue. I have tried netstat command and I have got something like this:

TCP 0.0.0.0:22     WIN-5L9MDF9HL08:0 LISTENING

TCP 192.168.1.69:49676    40.125.122.151:https TIME_WAIT

 

And when I'm connected with my phone I get this:

TCP 0.0.0.0:22     WIN-5L9MDF9HL08:0 LISTENING

TCP 192.168.1.69:22    RedmiNote8Pro0RedmiN:50189 ESTABLISHED

Your pc seems to be on a different port (49676)

Main PC:

CPU: AMD Ryzen 5 5600X | RAM:Corsair LPX 3200 mhz (16Gb) 

Mobo:ASUS Strix B550-F Wifi | GPU: MSI RTX 2070 Gaming Z

Case: Sharkoon Nightshark RGB| Storage: 500 GB 970 EVO Plus 1 TB WD blue 500 GB Samsung HDD

Monitor: iiyama G-Master G2470HSU-B1 165Hz

Powersupply: Be Quiet straight Power 10 500 watt

 

 

Main Laptop

CPU: AMD Ryzen 7 4800H | RAM: Team group 16 GB 2666 mhz

GPU: RTX 2060 (MXM swappable)

Monitor: 1080p 120Hz

Storage: 2x 1 TB Samsung 970 EVO NVMe (no raid)

 

 

Second Laptop

CPU: Intel Core I5 1235u,  RAM: Samsung 8 GB 3200 mhz

GPU: IrisXe 80 eu

Storage: 512 GB WD Digital SN530 NVMe

 

Phone:

Xiaomi MI 11

 

Work Phone:

Galaxy A50

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×