Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't connect using SSH key #33

Open
the-Arioch opened this issue Oct 29, 2021 · 1 comment
Open

can't connect using SSH key #33

the-Arioch opened this issue Oct 29, 2021 · 1 comment

Comments

@the-Arioch
Copy link

I was given a key file.... -----BEGIN RSA PRIVATE KEY----- and so forth, EOL is lone 0x0A not 0x0D 0x0A pair

Erroneously admins gave me a private key for root instead of creating a limited user as asked.
I am not sure it would make any difference.

The key has no passphrase.

I use the key to connect ssh session using MobaXTerm - and it works.

I can convert the file to PuTTY's .ppk format, but then yasfw fails to loaf it (MobaXTerm would use both formats).

yasfw -r -c --server <ip number> --user root --mount-point W: -C /vz/private..... --key d:\path\XXXXXXXX__root__id_rsa.key 

i run it and i get

Oct 29 20:31:06.231 INFO initializing, dokan_driver_version: 400, dokan_version:
 150
Oct 29 20:31:06.356 INFO connection established, server_public_key: CF:23:20:36:
----skip-----
:A0
Passphrase for private key: for "d:\path\XXXXXXXX__root__id_rsa.key":

i just press Enter for i have no passphrase there

Then one more line is output, and then yasfw appears to freeze - do nothing, says nothing

Password: Oct 29 20:31:56.495 INFO all keys are refused by server

Well, it is not ACTUALLY frozen, it jsut pretends to - becuase output lines order is broken above.

I press Enter again and then yasfw exits outputting a farewell

server_auth_methods: PASSWORD | PUBLICKEY | GSSAPI_MIC
 Oct 29 20:33:16.808 ERRO error occurred during authentication, error: SshError
{ error_type: Fatal, error_msg: "Socket error: disconnected", sftp_error_code: N
one }

It seems to me there are two problems.

  1. yasfw fails to accept the key.
  2. yasfw asks foir a passphrase where there is none at all
  3. yasfw outputs messages in wrong order, it should be like that instead:
INFO connection established, server_public_key: CF:23:20:36:
INFO Private key provided  "d:\path\XXXXXXXX__root__id_rsa.key", does not need a passphrase.
INFO all keys are refused by server
INFO server_auth_methods: PASSWORD | PUBLICKEY | GSSAPI_MIC
Password: _
@the-Arioch
Copy link
Author

USing MobaXTerm i converted private key to public key

---- BEGIN SSH2 PUBLIC KEY ----
Comment: "Imported-Openssh-Key: D:\\path\\XXXXXXXX__root__id_rsa.key"
AAAAB3.....................skip

But yasfw refuses to use it, says it fails to open the key file, just like with .ppk files

MobaXTerm still works ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant