LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-21-2018, 03:02 AM   #1
rokyo
Member
 
Registered: Oct 2012
Distribution: Ubuntu Mate 18.04 (production), Arch rolling (tinkering)
Posts: 102

Rep: Reputation: Disabled
What is my SSH user password in Windows 10?


Hi everybody!

I just installed the SSH server on Windows 10 according to this guide: https://www.ctrl.blog/entry/how-to-win10-ssh-service

Then, I tried to login from my laptop (which is on the same network and connected to the same physical switch as the Windows 10 machine) with the command:

Code:
ssh -p 22 rok@xxx.xxx.xxx.225
where rok is the name of my user's folder in Windows 10 and xxx.xxx.xxx.225 is the IP of the Windows 10 machine (the IP of the laptop from which I try logging in is xxx.xxx.xxx.236).

However, on the Windows 10 machine I don't use a local account but rather login with my Microsoft account (i.e. rokyo@live.com).

Now, when I try to SSH into the Windows 10 machine, which password and which username do I use? Is my username for SSH also 'rokyo@live.com' (with the according password) OR is it 'rok' (like my user's folder in Windows 10) and if yes which password does it have?

I actually tried logging in via:

Code:
ssh -p 22 rok@xxx.xxx.xxx.225
using the password of my Microsoft account and via:

Code:
ssh -p 22 rokyo@live.com@xxx.xxx.xxx.225
using the password of my Microsoft account but both just said:

Quote:
Permission denied, please try again.
So, what do I actually have to use as username/password for SSHing into Windows 10??

I'm quite confused.

Thanks in advance for any help!


-------------------------------------
SOLUTION:

Found the solution to my problem here: https://github.com/PowerShell/Win32-...-Win32-OpenSSH in case anyone else has this problem.

Last edited by rokyo; 03-21-2018 at 09:29 AM. Reason: Added the solution to the problem to first post so future users will wind it quickly
 
Old 03-21-2018, 03:08 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,782

Rep: Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304
Quote:
rokyo@live.com@xxx.xxx.xxx.225
is probably syntactically incorrect. Use -l <user> instead.
I don't know what will windows accept as username, but I would try: rokyo, rokyo@live.com.
And if nothing works I would also try to create a local account (just to check).
 
1 members found this post helpful.
Old 03-21-2018, 03:17 AM   #3
rokyo
Member
 
Registered: Oct 2012
Distribution: Ubuntu Mate 18.04 (production), Arch rolling (tinkering)
Posts: 102

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
is probably syntactically incorrect. Use -l <user> instead.
I don't know what will windows accept as username, but I would try: rokyo, rokyo@live.com.
And if nothing works I would also try to create a local account (just to check).
First of all: Thanks for the quick reply!


I just tried all those combinations and none worked.

Also, I switched from logging in with MS account to local account on the Windows 10 machine and explicitly set username and password as 'rokyo' and 'password' (not the real password, of course ).

When trying to SSH into the machine, connection still doesn't happen. No matter if I use

Code:
ssh -p 22 -l rokyo xxx.xxx.xxx.225
or

Code:
ssh -p 22 rokyo@xxx.xxx.xxx.225
with 'password'...

I think the SSH server on the Windows machine might not be configured and/or working correctly?
 
Old 03-21-2018, 03:20 AM   #4
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,288
Blog Entries: 3

Rep: Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718
The fork of OpenSSH to Windows is not guaranteed to work. There are many pieces that have not been ported yet and probably quite a few that won't or can't be ported. But if you are still insisting in running Vist10 on bare metal that machine, then you would be better served asking at one of the many Windows forums.

If you really are interested in getting a working SSH server on that hardware, then back up your data, wipe the hard drive, install GNU/Linux with OpenSSH-server, and then put Vista10 into a virtual machine, such as VirtualBox or Qemu, and restore your Windows data into the virtual machine. If you make an extra disc partition you should, in theory, be able to get the Vista10 virtual machine guest to access that partition on the host from the virtual machine. Then your virtual machine's host system would also be able to access that same partition, even when you connect via SSH.
 
Old 03-21-2018, 03:22 AM   #5
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,782

Rep: Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304
yes, probably, or it is a firewall related issue.
 
Old 03-21-2018, 03:30 AM   #6
rokyo
Member
 
Registered: Oct 2012
Distribution: Ubuntu Mate 18.04 (production), Arch rolling (tinkering)
Posts: 102

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
yes, probably, or it is a firewall related issue.
Could be! I just realized that I cannot even ping the Windows 10 machine from my laptop...

But my Windows firewall rules explicitly state that port 22 is open for business: https://imgur.com/FEFOfXi

Also, when I try to ping the Windows 10 machine, I get nothing:

Code:
>ping xxx.xxx.xxx.225
>PING xxx.xxx.xxx.225 (xxx.xxx.xxx.225) 56(84) bytes of data...
It just stays like that no matter how long I leave it to run, BUT: when I leave the ping command running and then reboot the Windows 10 machine, the ping response changes to:

Code:
>From xxx.xxx.xxx.225 icmp_seq=1902 Destination Host Unreachable
>From xxx.xxx.xxx.225 icmp_seq=1903 Destination Host Unreachable
>From xxx.xxx.xxx.225 icmp_seq=1904 Destination Host Unreachable
>From xxx.xxx.xxx.225 icmp_seq=1905 Destination Host Unreachable
until the Windows 10 machine has finished rebooting. Then it goes back to nothing... ?
 
Old 03-21-2018, 03:31 AM   #7
rokyo
Member
 
Registered: Oct 2012
Distribution: Ubuntu Mate 18.04 (production), Arch rolling (tinkering)
Posts: 102

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Turbocapitalist View Post
The fork of OpenSSH to Windows is not guaranteed to work. There are many pieces that have not been ported yet and probably quite a few that won't or can't be ported. But if you are still insisting in running Vist10 on bare metal that machine, then you would be better served asking at one of the many Windows forums.

If you really are interested in getting a working SSH server on that hardware, then back up your data, wipe the hard drive, install GNU/Linux with OpenSSH-server, and then put Vista10 into a virtual machine, such as VirtualBox or Qemu, and restore your Windows data into the virtual machine. If you make an extra disc partition you should, in theory, be able to get the Vista10 virtual machine guest to access that partition on the host from the virtual machine. Then your virtual machine's host system would also be able to access that same partition, even when you connect via SSH.
I would actually love to do that, but it's a work machine and my boss won't allow it to run Linux... :-/

However, he still wants us to be able to remote SSH from home into our work machines... which seems impossible with the current state of the Windows 10 SSH implementation?
 
Old 03-21-2018, 03:37 AM   #8
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,288
Blog Entries: 3

Rep: Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718
Quote:
Originally Posted by rokyo View Post
I would actually love to do that, but it's a work machine and my boss won't allow it to run Linux... :-/
No problem. There's also FreeBSD and OpenBSD. If you try FreeBSD, then the distro TrueOS does most of the configuration of desktop niceties for you. Because TrueOS is FreeBSD it is very simple to ensure a working SSH server.

Otherwise, you'll need to repair your boss' lack of knowledge.

In the mean time, I hope you are billing him sufficiently for his ridiculous request for networked software on Vista10 and letting him know he is asking you to try to squeeze blood from a turnip. Or, since this is Vista10 in question, from a turd.

Again a Windows forum might be the best place to ask about Windows problems.
 
Old 03-21-2018, 03:41 AM   #9
rokyo
Member
 
Registered: Oct 2012
Distribution: Ubuntu Mate 18.04 (production), Arch rolling (tinkering)
Posts: 102

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Turbocapitalist View Post
No problem. There's also FreeBSD and OpenBSD. If you try FreeBSD, then the distro TrueOS does most of the configuration of desktop niceties for you. Because TrueOS is FreeBSD it is very simple to ensure a working SSH server.

Otherwise, you'll need to repair your boss' lack of knowledge.

In the mean time, I hope you are billing him sufficiently for his ridiculous request for networked software on Vista10 and letting him know he is asking you to try to squeeze blood from a turnip. Or, since this is Vista10 in question, from a turd.

Again a Windows forum might be the best place to ask about Windows problems.
I'm sure when I explain to my boss that SSH won't work, he'll make me install Teamviewer or something like that...

Maybe I should just bring a private computer (with Linux on it) to work and SSH into that.
 
Old 03-21-2018, 03:41 AM   #10
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,782

Rep: Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304
If I remember well you can install cygwin onto windows and use its ssh server, do not need to drop win10.
about post #6, it looks like a firewall or something similar (probably and antivirus sw?)
you can try to reach port by: telnet host port
 
Old 03-21-2018, 03:46 AM   #11
rokyo
Member
 
Registered: Oct 2012
Distribution: Ubuntu Mate 18.04 (production), Arch rolling (tinkering)
Posts: 102

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
If I remember well you can install cygwin onto windows and use its ssh server, do not need to drop win10.
about post #6, it looks like a firewall or something similar (probably and antivirus sw?)
you can try to reach port by: telnet host port
Using

Code:
telnet xxx.xxx.xxx.225 22
gets me:

Code:
>Trying xxx.xxx.xxx.225...
>Connected to xxx.xxx.xxx.225.
>Escape character is '^]'.
>SSH-2.0-MS_1.100
and a blinking cursor under that last line. When I type anything at that point (including just pressing ENTER) it goes:

Code:
Connection closed by foreign host.
and back to my regular bash prompt.
 
Old 03-21-2018, 04:19 AM   #12
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,782

Rep: Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304
that means you were connected to the ssh server (that was the message: SSH-2.0-MS_1.100), so in general you can connect, but you cannot authenticate.
 
Old 03-21-2018, 08:10 AM   #13
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,632
Blog Entries: 4

Rep: Reputation: 3931Reputation: 3931Reputation: 3931Reputation: 3931Reputation: 3931Reputation: 3931Reputation: 3931Reputation: 3931Reputation: 3931Reputation: 3931Reputation: 3931
Quote:
Originally Posted by rokyo View Post
However, he still wants us to be able to remote SSH from home into our work machines... which seems impossible with the current state of the Windows 10 SSH implementation?
I would explain your difficulties to him and ask your company's IT Department to sort the issue out for you. This is their stuff and their responsibility, legal and otherwise. So, "put the monkey on their back, where it properly belongs."

Furthermore, I would recommend that your company use OpenVPN with tls-auth, not ssh, as your means of securing access to the company machines. Individual laptops are issued unique digital certificates, any one of which can be individually revoked. And the company's OpenVPN server cannot be detected, as I describe at length in my blog here. It is quite-literally a secret door.

You very quickly get used to: "Number of unauthorized access attempts: Zero."

Users simply "open the tunnel," giving them access to other things including Microsoft networking, remote logins and so on. Effectively, when the tunnel is open, "they are present on the company's internal network." They don't have to consider that OpenVPN is anything more than just another network router. But everything that passes along the Internet wire is very securely encrypted, and there's no way to get to the other side except through the tunnel. Should any particular laptop be stolen, its credentials can be made to "drop dead" without affecting anyone else's. (Password-encryption of the key materials is an optional, additional feature, good for "keeping the honest people out.")

Last edited by sundialsvcs; 03-21-2018 at 08:15 AM.
 
2 members found this post helpful.
Old 03-21-2018, 09:12 AM   #14
Delcaran
Member
 
Registered: Dec 2013
Location: ud.fvg.it
Distribution: Slackware64 14.2
Posts: 44

Rep: Reputation: 27
Working SSH servers for windows are MobaXterm and FreeSSHd, both free.
 
1 members found this post helpful.
Old 03-21-2018, 09:24 AM   #15
rokyo
Member
 
Registered: Oct 2012
Distribution: Ubuntu Mate 18.04 (production), Arch rolling (tinkering)
Posts: 102

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by sundialsvcs View Post
I would explain your difficulties to him and ask your company's IT Department to sort the issue out for you. This is their stuff and their responsibility, legal and otherwise. So, "put the monkey on their back, where it properly belongs."

Furthermore, I would recommend that your company use OpenVPN with tls-auth, not ssh, as your means of securing access to the company machines. Individual laptops are issued unique digital certificates, any one of which can be individually revoked. And the company's OpenVPN server cannot be detected, as I describe at length in my blog here. It is quite-literally a secret door.

You very quickly get used to: "Number of unauthorized access attempts: Zero."

Users simply "open the tunnel," giving them access to other things including Microsoft networking, remote logins and so on. Effectively, when the tunnel is open, "they are present on the company's internal network." They don't have to consider that OpenVPN is anything more than just another network router. But everything that passes along the Internet wire is very securely encrypted, and there's no way to get to the other side except through the tunnel. Should any particular laptop be stolen, its credentials can be made to "drop dead" without affecting anyone else's. (Password-encryption of the key materials is an optional, additional feature, good for "keeping the honest people out.")
Thanks for the info! I'll check out the blog when I get back home!


BTW, I found this guide here https://github.com/PowerShell/Win32-...-Win32-OpenSSH which solved my original issue. But the openVPN way sounds even better, I'll check that out, too!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Password less ssh for NIS user sagar666 Linux - Server 1 01-13-2015 10:06 AM
[SOLVED] change password of other user using ssh bloodstreetboy Linux - Newbie 5 09-12-2012 03:55 AM
ssh without password -- non-root user Sanford Stein Linux - Newbie 18 03-31-2010 12:10 PM
release all user to ssh without password elainelaw Linux - Newbie 6 01-07-2010 12:08 PM
ssh without user password question tonyfreeman Linux - Security 2 10-26-2004 11:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration