0

Hi I am trying to connect to a server using x2go client. I filled everything out under session preferences.

I am trying to use a RSA/DSA key for ssh connection.

I first made a key in terminal and then tried to use that in x2go but I get the error message

"access denied for `none'. Authentication that can continue : publickey"

I then tried to convert the private key into a public key using PuttyGen. However this public key still gives me same error message when I use it in x2go.

Lastly, I tried to generate a new public and private key using PuttyGen. I'm able to generate the new keys but when I use it in x2go, I still get the same error message

"access denied for `none'. Authentication that can continue : publickey"

Thus, using private keys or public keys, I am still getting this same error message it seems.

What am I doing wrong and how can I fix this error? Thanks

Jeff Faraci
  • 403
  • 13
  • 28

2 Answers2

3

Try using openssh instead (install the OpenSSH client for Windows 10)

Then type:

ssh-keygen -m PEM -P "" -t rsa

That should create a %USERPROFILE%\.ssh\id_rsa(.pub) key file pair (private/public)

Copy the id_rsa.pub public key to your remote server, adding it to ~remoteUSer/.ssh/authorized_keys

Then an SSH would work.

ssh remoteUSer@remoteServer
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I'm trying to implement this now. I'll comment further shortly. Thank you so much – Jeff Faraci Aug 31 '20 at 14:47
  • I was able to generate the key file pair. However, how do I copy and add it to the ~remoteUSer/.ssh/authorizedkeys? Also, will this ssh then only be through the command prompt? I wanted to use x2go since I need to be able to see the whole screen, instead of using just command line – Jeff Faraci Aug 31 '20 at 14:58
  • @JeffFaraci You need to connect to the remote server, as the remote user (using its account password), and then you can copy the content of the public key. If the private key has a default name, in the default path (HOME or USERPROFILE), x2go should pick it up. – VonC Aug 31 '20 at 15:01
  • I am in x2go and I added that newly generated key into RSA/DSA key. However, I still cannot connect. I am not able to connect to the remote server, that's what I am trying to do. I do not know how to implement your comment "Copy the id_rsa.pub public key to your remote server, adding it to ~remoteUSer/.ssh/authorized_keys", what can I type into command line such that it'll do this? – Jeff Faraci Aug 31 '20 at 15:05
  • @JeffFaraci If you can `cat ~/.ssh/id_rsa.pub`, you can copy it to the clipboard. From there, you connect to the remote server, edit the `~/.ssh/authorized_keys` and paste the content of that public key. – VonC Aug 31 '20 at 15:07
  • Thanks for helping me. I am unable to use the `cat' command you suggested, it says it is not recognized as an internal or external command – Jeff Faraci Aug 31 '20 at 15:08
  • @JeffFaraci The x2go official documentation recommend `ssh-copy-id`: https://wiki.x2go.org/doku.php/wiki:advanced:authentication:passwordless-ssh – VonC Aug 31 '20 at 15:09
  • Thanks, ssh-copy-id is for Linux clients, I am a windows client. I've tried to navigate the site you gave me but it's still just not working. I don't know why it's so complicated to get into x2go. I have made the public and private keys. If you have any suggestions please let me know, thanks – Jeff Faraci Aug 31 '20 at 15:30
  • @JeffFaraci Simply copy the content of the public key. Using type (https://superuser.com/a/434876/141), and copy it to the clipboard (https://stackoverflow.com/a/11543856/6309) – VonC Aug 31 '20 at 15:40
  • Okay, sorry I'm not so great at this. I copied and pasted the public and private key (that I generated with your suggestion) into the x2go folder. Is this what you mean? The public key is now inside the x2go client folder. – Jeff Faraci Aug 31 '20 at 15:52
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/220746/discussion-between-vonc-and-jeff-faraci). – VonC Aug 31 '20 at 15:54
  • @JeffFaraci I see the answer accepted (I put more possible action points in the chat): how did you lake it work? – VonC Sep 01 '20 at 11:32
  • The `ssh-keygen` was the only option that worked with Ubuntu 18.04.5 on both client and server. It also worked with Ubuntu 18.04.5 on the client and 20.04.1 on the server. The access denied problem appears to be with the client side and 18.04.5. – Daisuke Aramaki Dec 15 '20 at 16:31
3

One issue that I have experienced with this is my key had a passphrase on it. I solved the problem by removing the passphrase.

Inside a terminal window:

ssh-keygen -p
  1. Type in the name of the key you want to change
  2. Enter the old passphrase
  3. Enter the new passphrase
  4. Enter the new passphrase again
Tim Strawbridge
  • 646
  • 4
  • 9
  • Me too! That's a security hole. I do not like having a file on my workstation that gives access to my database server. But at least I'm in. Thanks for the suggestion. Same solution mentioned at https://bugs.mysql.com/bug.php?id=94620) – tbc0 Feb 03 '21 at 19:07