Long Hilestered

  • Home
  • Sitemap
Home  ›  Password Permission Denied Please Try Again

Password Permission Denied Please Try Again

Written By Campbell Heing2002 sexta-feira, 20 de maio de 2022 Add Comment Edit

question

LiBai-8545 avatar image

Unable to access the win10 PC with OpenSSH installed through ssh command

I accept installed the OpenSSH customer and server in my win10 PC through this website (https://docs.microsoft.com/en-u.s.a./windows-server/assistants/openssh/openssh_install_firstuse). Nonetheless, when I tried to access the PC with ssh command through another PC, the ssh connection showed the error message with Permission denied, delight try again. even if I entered the correct username and countersign. When I tried to admission through ambassador, the error message was Connection reset by xxx.30.30.xxx.

In order to verify this problem, I tried ssh command on the aforementioned PC. And the error message kept showing. But when I use ssh command to access another Linux PC, everything was working functionally.

Are in that location any other settings that need to exist done with the OpenSSH server?

My OS is win10 Enterprise Edition LTSC ver. 1809 with 17763.1457

windows-server

Hello @LiBai-8545 , thanks for the question.

Can you provide debug logs from the OpenSSH Server on the Windows ten PC? For more on logging see here.

0 Votes 0 ·

Hi @LiBai-8545 ,

I'm just following up. Are you able to provide debug logs from your OpenSSH Server so we can drill down further into the issue?

0 Votes 0 ·

Thanks very much for the quick respond. I have tried the way you offered to me. There are 2 different outputs in the PowerShell: One is the not-administrator way and the other is the administrator mode.

Administrator Style

Server Side:

                            shell PS C:\ProgramData\ssh> sshd.exe -d debug1: sshd version OpenSSH_for_Windows_7.seven, LibreSSL ii.6.5 debug1: private host key #0: ssh-rsa SHA256:jnTuBmo0b1YYlgQjoLi6CtcQM83P+9DJVjR4BOn4smU debug1: private host fundamental #1: ecdsa-sha2-nistp256 SHA256:IYiYLWzCLvUfmuyrg9HZ3cVnAroABOBWX5vMbsU0o2Y debug1: individual host key #2: ssh-ed25519 SHA256:T1EhNRlKjN/eJBI/tkpudAhZnG0Kk3Hp7cHAF4L82AU debug1: rexec_argv[0]='C:\\Windows\\System32\\OpenSSH\\sshd.exe' debug1: rexec_argv[ane]='-d' debug1: Bind to port 23 on ::. Server listening on :: port 23. debug1: Bind to port 23 on 0.0.0.0. Server listening on 0.0.0.0 port 23.                          

0 Votes 0 ·

I am sorry the debug information is as well long. And the reply box is limited past 1000 words. I volition post the complete debug data in the respond box.

0 Votes 0 ·

I was also having the same event,
after I blindly copied a command from a blog post,
and executed it

New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\Program Files\PowerShell\seven\pwsh.exe" -PropertyType String -Force

scratched my head for more than 10 hours,

so I did debug run of sshd with this command on Windows ten host:
sshd -d
and tried to connect from my Linux motorcar as usual:
ssh james@192.168.1.123

I saw this line in my Windows debug prompt:
User james not allowed because beat c:\\plan files\\powershell\\7\\pwsh.exe does not exist

so I executed this control once more with modified path to Powershell 7 executable,

New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\Programme Files\WindowsApps\Microsoft.PowerShell_7.ii.i.0_x64__8wekyb3d8bbwe\pwsh.exe" -PropertyType String -Strength

and it fixed my problem

0 Votes 0 ·

LiBai-8545 avatar image

Here is the debug data on the server and client sides.

Administrator Fashion PowerShell

Server Side

                    shell PS C:\ProgramData\ssh> sshd.exe -d debug1: sshd version OpenSSH_for_Windows_7.7, LibreSSL two.six.5 debug1: private host key #0: {} debug1: private host key #i: {} debug1: individual host key #ii: {} debug1: rexec_argv[0]='C:\\Windows\\System32\\OpenSSH\\sshd.exe' debug1: rexec_argv[1]='-d' debug1: Bind to port 23 on ::. Server listening on :: port 23. debug1: Bind to port 23 on 0.0.0.0. Server listening on 0.0.0.0 port 23.                  

Client Side

                    beat PS C:\Windows\system32> ssh.exe -v -p 23 LiBai@127.0.0.1 OpenSSH_for_Windows_7.7p1, LibreSSL ii.6.five debug1: Connecting to 127.0.0.ane [127.0.0.1] port 23. debug1: Connection established. debug1: key_load_public: No such file or directory debug1: identity file C:\\Users\\LiBai/.ssh/id_rsa type -one debug1: key_load_public: No such file or directory debug1: identity file C:\\Users\\LiBai/.ssh/id_rsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file C:\\Users\\LiBai/.ssh/id_dsa type -1 debug1: key_load_public: No such file or directory debug1: identity file C:\\Users\\LiBai/.ssh/id_dsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file C:\\Users\\LiBai/.ssh/id_ecdsa type -1 debug1: key_load_public: No such file or directory debug1: identity file C:\\Users\\LiBai/.ssh/id_ecdsa-cert blazon -1 debug1: key_load_public: No such file or directory debug1: identity file C:\\Users\\LiBai/.ssh/id_ed25519 type -one debug1: key_load_public: No such file or directory debug1: identity file C:\\Users\\LiBai/.ssh/id_ed25519-cert blazon -1 debug1: key_load_public: No such file or directory debug1: identity file C:\\Users\\LiBai/.ssh/id_xmss type -ane debug1: key_load_public: No such file or directory debug1: identity file C:\\Users\\LiBai/.ssh/id_xmss-cert type -1 debug1: Local version string SSH-2.0-OpenSSH_for_Windows_7.7 debug1: Remote protocol version two.0, remote software version OpenSSH_for_Windows_7.7 debug1: match: OpenSSH_for_Windows_7.seven pat OpenSSH* compat 0x04000000 debug1: Authenticating to 127.0.0.i:23 every bit 'LiBai' debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: algorithm: curve25519-sha256 debug1: kex: host primal algorithm: ecdsa-sha2-nistp256 debug1: kex: server->customer cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none debug1: kex: client->server zippo: chacha20-poly1305@openssh.com MAC: <implicit> compression: none debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug1: Server host fundamental: ecdsa-sha2-nistp256 SHA256:IYiYLWzCLvUfmuyrg9HZ3cVnAroABOBWX5vMbsU0o2Y debug1: checking without port identifier debug1: Host '127.0.0.1' is known and matches the ECDSA host fundamental. debug1: Constitute key in C:\\Users\\LiBai/.ssh/known_hosts:3 debug1: institute matching primal due west/out port debug1: rekey after 134217728 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: rekey after 134217728 blocks debug1: pubkey_prepare: ssh_get_authentication_socket: No such file or directory debug1: SSH2_MSG_EXT_INFO received debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521> debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can proceed: publickey,password,keyboard-interactive debug1: Side by side hallmark method: publickey debug1: Trying private key: C:\\Users\\LiBai/.ssh/id_rsa debug1: Trying private key: C:\\Users\\LiBai/.ssh/id_dsa debug1: Trying private cardinal: C:\\Users\\LiBai/.ssh/id_ecdsa debug1: Trying private primal: C:\\Users\\LiBai/.ssh/id_ed25519 debug1: Trying individual key: C:\\Users\\LiBai/.ssh/id_xmss debug1: Next authentication method: keyboard-interactive debug1: Authentications that can go on: publickey,password,keyboard-interactive debug1: Adjacent authentication method: countersign debug1: read_passphrase: can't open /dev/tty: No such file or directory LiBai@127.0.0.1's password: debug1: Authentications that can continue: publickey,password,keyboard-interactive Permission denied, delight endeavor once more. debug1: read_passphrase: tin't open /dev/tty: No such file or directory LiBai@127.0.0.one's password: debug1: Authentications that can keep: publickey,password,keyboard-interactive Permission denied, delight try again. debug1: read_passphrase: can't open /dev/tty: No such file or directory LiBai@127.0.0.1's password: debug1: Authentications that tin can continue: publickey,countersign,keyboard-interactive debug1: No more than authentication methods to try. LiBai@127.0.0.1: Permission denied (publickey,password,keyboard-interactive). PS C:\Windows\system32>                  

Non-Ambassador Mode PowerShell

Server Side:

                    shell PS C:\Users\LiBai> sshd.exe -d debug1: sshd version OpenSSH_for_Windows_7.7, LibreSSL 2.6.five debug1: key_load_private: Permission denied debug1: key_load_public: Permission denied Could not load host key: __PROGRAMDATA__\\ssh/ssh_host_rsa_key debug1: key_load_private: Permission denied debug1: key_load_public: Permission denied Could not load host key: __PROGRAMDATA__\\ssh/ssh_host_ecdsa_key debug1: key_load_private: Permission denied debug1: key_load_public: Permission denied Could not load host key: __PROGRAMDATA__\\ssh/ssh_host_ed25519_key sshd: no hostkeys available -- exiting. PS C:\Users\LiBai>                  

Customer Side

                    shell PS C:\Users\LiBai> ssh.exe -v -p 23 LiBai@127.0.0.i OpenSSH_for_Windows_7.7p1, LibreSSL ii.vi.5 debug1: Connecting to 127.0.0.1 [127.0.0.one] port 23. debug1: Connection established. debug1: key_load_public: No such file or directory debug1: identity file C:\\Users\\LiBai/.ssh/id_rsa blazon -1 debug1: key_load_public: No such file or directory debug1: identity file C:\\Users\\LiBai/.ssh/id_rsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file C:\\Users\\LiBai/.ssh/id_dsa type -1 debug1: key_load_public: No such file or directory debug1: identity file C:\\Users\\LiBai/.ssh/id_dsa-cert blazon -1 debug1: key_load_public: No such file or directory debug1: identity file C:\\Users\\LiBai/.ssh/id_ecdsa type -1 debug1: key_load_public: No such file or directory debug1: identity file C:\\Users\\LiBai/.ssh/id_ecdsa-cert blazon -1 debug1: key_load_public: No such file or directory debug1: identity file C:\\Users\\LiBai/.ssh/id_ed25519 type -1 debug1: key_load_public: No such file or directory debug1: identity file C:\\Users\\LiBai/.ssh/id_ed25519-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file C:\\Users\\LiBai/.ssh/id_xmss blazon -1 debug1: key_load_public: No such file or directory debug1: identity file C:\\Users\\LiBai/.ssh/id_xmss-cert type -1 debug1: Local version string SSH-2.0-OpenSSH_for_Windows_7.7 debug1: Remote protocol version ii.0, remote software version OpenSSH_for_Windows_7.seven debug1: match: OpenSSH_for_Windows_7.vii pat OpenSSH* compat 0x04000000 debug1: Authenticating to 127.0.0.1:23 as 'LiBai' debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: algorithm: curve25519-sha256 debug1: kex: host key algorithm: ecdsa-sha2-nistp256 debug1: kex: server->customer cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none debug1: kex: customer->server cypher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug1: Server host key: ecdsa-sha2-nistp256 SHA256:IYiYLWzCLvUfmuyrg9HZ3cVnAroABOBWX5vMbsU0o2Y debug1: checking without port identifier debug1: Host '127.0.0.1' is known and matches the ECDSA host key. debug1: Found primal in C:\\Users\\LiBai/.ssh/known_hosts:3 debug1: found matching key w/out port debug1: rekey after 134217728 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: rekey later 134217728 blocks debug1: pubkey_prepare: ssh_get_authentication_socket: No such file or directory debug1: SSH2_MSG_EXT_INFO received debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521> debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can go along: publickey,password,keyboard-interactive debug1: Next hallmark method: publickey debug1: Trying private key: C:\\Users\\LiBai/.ssh/id_rsa debug1: Trying private key: C:\\Users\\LiBai/.ssh/id_dsa debug1: Trying individual key: C:\\Users\\LiBai/.ssh/id_ecdsa debug1: Trying private fundamental: C:\\Users\\LiBai/.ssh/id_ed25519 debug1: Trying private cardinal: C:\\Users\\LiBai/.ssh/id_xmss debug1: Next authentication method: keyboard-interactive debug1: Authentications that can continue: publickey,password,keyboard-interactive debug1: Next authentication method: password debug1: read_passphrase: can't open /dev/tty: No such file or directory LiBai@127.0.0.ane'south password: debug1: Authentications that can continue: publickey,password,keyboard-interactive Permission denied, please try again. debug1: read_passphrase: can't open /dev/tty: No such file or directory LiBai@127.0.0.1'due south password: debug1: Authentications that tin proceed: publickey,password,keyboard-interactive Permission denied, delight try again. debug1: read_passphrase: can't open /dev/tty: No such file or directory LiBai@127.0.0.one's password: debug1: Authentications that tin continue: publickey,password,keyboard-interactive debug1: No more than authentication methods to try. LiBai@127.0.0.i: Permission denied (publickey,password,keyboard-interactive). PS C:\Users\LiBai>                  

Hi @LiBai-8545,

Thanks for the detailed logs. And so a few things to try.

  1. On the client try
    ssh -v -p 23 LiBai@127.0.0.1

You don't demand to be in that directory nor exercise you need the ssh.exe. Secondly please ensure 127.0.0.one is the valid IP address of the server automobile and is accessible from the client.

  1. If y'all still can't get it to work after verifying above, it appears your having an issue with the authentication. This guide here shows how to setup a Windows SSH Server and connect to it with Linux. Y'all should focus on the first half of the guide by ensuring y'all have the correct firewall rules in windows firewall (step 11) and read admission. If you get this far and are withal having issues, I'thou confident it is a firewall or other hallmark outcome. Please let me know how this goes, I'd like to see you resolve this. :)

0 Votes 0 ·

Hello @LiBai-8545 , just following upwardly again as I haven't heard if this helped you resolve your issue. Let me know where your at.

0 Votes 0 ·

Thank you for your help. Just I cannot detect the sshd service in the Services Window......

0 Votes 0 ·

Same problem. In my example I'm a higher professor and I had my students set upwards sshd in club support an upcoming assignment where they need to examine the effect of setting file ACL permissions in one PowerShell window while setting them in another. Almost half of the students were successful. This is one of the issues that occurred in the other half. The students are all at a level by the Windows ten 1709 release running PowerShell 7 and their NetworkCategory is prepare to Private.

I stopped the sshd server to that I could run sshd manually as the traffic was not going to the other daemon.

stop-service sshd
sshd -d

As well not certain where the config files would become in Windows. There's the subconscious .ssh directory nether $HOME in each user's account - it currently simply has one file known_hosts. And so in that location's the \Windows\System32\Drivers\etc directory only this doesn't accept (at present) an ssh subdirectory.

0 Votes 0 ·

Weily avatar image

Weily answered Oct 3, 'twenty MotoX80 commented Oct 4, '20

Ensure you gear up static IP address and ensure /etc/ssh/sshd_config file:
To enable countersign hallmark, uncomment

PasswordAuthentication aye

To enable root login, uncomment

PermitRootLogin yep

To enable SSH key login, uncomment

PubkeyAuthentication yes

AuthorizedKeysFile .ssh/authorized_keys

Give thanks you very much for your help. I have uncommented the PasswordAuthentication aye and PermitRootLogin yeah. Considering I don't utilise the cardinal to log in, I didn't uncomment the key-related commands. So I restart the PC, The error bulletin remained the same...

BTW, I too cannot notice the sshd service in the Services Window......

Are there whatsoever other settings that demand to be done after installing the OpenSSH Server and Client software?

0 Votes 0 ·

OpenSSH SSH Server

30054-capture.jpg


0 Votes 0 ·

WHWF-8864 avatar image

I am as well having this effect at present where I cannot SSH into my win 10 car from my VM (virtual box) RHEL 8.5 server, simply I can SSH from my win10 into the RHEL server...
[SH_Admin@Homme-Network-Security-Server bin]$ ssh -p 22 inspiropectus7@192.168.1.157 -vT
OpenSSH_8.0p1, OpenSSL i.1.1k FIPS 25 Mar 2021
debug1: Reading configuration information /etc/ssh/ssh_config
debug1: Reading configuration information /etc/ssh/ssh_config.d/05-redhat.conf
debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config
debug1: configuration requests final Friction match laissez passer
debug1: re-parsing configuration
debug1: Reading configuration information /etc/ssh/ssh_config
debug1: Reading configuration data /etc/ssh/ssh_config.d/05-redhat.conf
debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config
debug1: Connecting to 192.168.i.157 [192.168.1.157] port 22.
debug1: Connectedness established.
debug1: identity file /dwelling/SH_Admin/.ssh/id_rsa type 0
debug1: identity file /habitation/SH_Admin/.ssh/id_rsa-cert type -1
debug1: identity file /home/SH_Admin/.ssh/id_dsa type -i
debug1: identity file /home/SH_Admin/.ssh/id_dsa-cert type -ane
debug1: identity file /domicile/SH_Admin/.ssh/id_ecdsa type 2
debug1: identity file /habitation/SH_Admin/.ssh/id_ecdsa-cert blazon -ane
debug1: identity file /home/SH_Admin/.ssh/id_ed25519 type -i
debug1: identity file /home/SH_Admin/.ssh/id_ed25519-cert type -ane
debug1: identity file /habitation/SH_Admin/.ssh/id_xmss type -ane
debug1: identity file /home/SH_Admin/.ssh/id_xmss-cert blazon -1
debug1: Local version string SSH-2.0-OpenSSH_8.0
debug1: Remote protocol version 2.0, remote software version OpenSSH_for_Windows_8.i
debug1: match: OpenSSH_for_Windows_8.i pat OpenSSH* compat 0x04000000
debug1: Authenticating to 192.168.i.157:22 as 'inspiropectus7'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: aes256-gcm@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: aes256-gcm@openssh.com MAC: <implicit> pinch: none
debug1: kex: curve25519-sha256 demand=32 dh_need=32
debug1: kex: curve25519-sha256 need=32 dh_need=32
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:<Key is present>
debug1: Host '192.168.1.157' is known and matches the ECDSA host key.
debug1: Found key in /home/SH_Admin/.ssh/known_hosts:one
debug1: rekey out afterwards 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 4294967296 blocks
debug1: Will attempt key: /home/SH_Admin/.ssh/id_rsa RSA SHA256:<Primal is present> agent
debug1: Will endeavour primal: /home/SH_Admin/.ssh/id_ecdsa ECDSA SHA256:<Key is present> agent
debug1: Volition endeavor key: /home/SH_Admin/.ssh/id_dsa
debug1: Will attempt cardinal: /dwelling house/SH_Admin/.ssh/id_ed25519
debug1: Will try primal: /home/SH_Admin/.ssh/id_xmss
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can go along: publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Offer public key: /home/SH_Admin/.ssh/id_rsa RSA SHA256:<Key is present> amanuensis
debug1: Authentications that can continue: publickey,countersign,keyboard-interactive
debug1: Offering public key: /habitation/SH_Admin/.ssh/id_ecdsa ECDSA SHA256:<Cardinal is nowadays> agent
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Trying private key: /home/SH_Admin/.ssh/id_dsa
debug1: Trying private key: /home/SH_Admin/.ssh/id_ed25519
debug1: Trying private key: /home/SH_Admin/.ssh/id_xmss
debug1: Next authentication method: keyboard-interactive
debug1: Authentications that tin continue: publickey,password,keyboard-interactive
debug1: Next hallmark method: countersign

(Please note I replaced the areas where at that place are key representation with "<Key is present>"
After that I effort to cosign with my countersign from the Win10 machine and I get the error:

inspiropectus7@192.168.1.157's password:
debug1: Authentications that can continue: publickey,password,keyboard-interactive
Permission denied, please try again.
inspiropectus7@192.168.i.157's countersign:
debug1: Authentications that tin keep: publickey,password,keyboard-interactive
Permission denied, please try again.
inspiropectus7@192.168.1.157's password:
Received disconnect from 192.168.1.157 port 22:2: Likewise many authentication failures
Disconnected from 192.168.one.157 port 22


Ojitha-4457 avatar image

I accept the same result. Spending a lot of time installing and configure the OpenSSH server on Windows ten and tried to access it via MacOs OpenSSH customer, only nothing was resolved. All these problems with Windows 10, but Linux and MacOs OpenSSH servers are running without any problems. Why this problem ?

question details

Related Questions

longhilestered.blogspot.com

Source: https://docs.microsoft.com/answers/questions/109609/unable-to-access-the-win10-pc-with-openssh-install.html

Share this post

0 Response to "Password Permission Denied Please Try Again"

Postar um comentário

Postagem mais recente Postagem mais antiga Página inicial
Assinar: Postar comentários (Atom)

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel

Popular Post

  • Sims 4 Is There a Way to Make Your Sim Young Again
    It's rare that a game reminds its players that time is passing like The Sims franchise. The latest part of the franchi...
  • Funny Way to Say Happy Birthday Reddit on Facebook
    Birthdays are the most normally historic days in people's lives and that is because everyone has a birthday. They are ...
  • Teacher Retirement Social Security Continue Working
    Key Takeaways Working after r...



banner



Copyright - Long Hilestered