PDA

View Full Version : [Server e PC] Errore: ../etc/ssh_host_rsa_key.pub


pacchero
22-02-2011, 14:38
Giorno a tutti, sono nuovo sul forum e sono qui per chiedervi aiuto non riuscendo a trovare nulla nell'archivio. Allora, sono qui per chiedervi aiuto riguardo questa cosa:

Due giorni fa ho acquistato un VPS con sistema operativo Linux 10.8 Lucyd. Ho provato ad istallare l'interfaccia grafica e non ci sono riuscito. L'assistenza ha visto dei difetti non causati da me, ed il tutorial che loro mi avevano consigliato non lo ho usato più. Così il tizio dell'assistenza mi ha installato l'interfaccia Grafica. Adesso mi ha dato un nuovo client per il VPS che si chiama x2go che ha un programmino Xming che mi serve per connettermi al server. Detto ciò ho scaricato il programmino e lo installato, ma quando cerco di collegarmi al VPS mettendo nome server, utente e password mi da questo Errore:

Error: Can't Read rsa host key C:\program file\x2go\etc\ssh_host_rsa_key.pub

Poi mi dice Enable to Read .pub e un'altra cosa ancora. Ho contattato l'assistenza del server e mi dice che é un errore normale e mi ha detto "Ciao".

Come faccio a creare questo file? Dovrei fare altro? Chi di voi mi può guidare un pò perché non mi andrebbe di buttar a vuoto alcuni giorni del VPS. Ringrazio tutti in Anticipo e spero in una risposta..:)

pacchero
22-02-2011, 15:39
Se vi può essere utile ho trovato questo documento in Inglese in cui un tiozio con il mio stesso software ha avuto lo stesso problema.


Notes -- getting the Windows32 x2go client working

Background:

We loaded the x2go client using the executable at

http://prdownload.berlios.de/x2go/x2goclient-3.01-2-setup.exe

When attempt a login session we get the following error:

“Can’t read host RSA key C:\cygwin\etc\ssh_host_rsa_key.pub”

This error indicates that a file does not exist at the location that is apparently hard coded into the app. It is not clear if the issues on my computer generalize to others but here is a summary of how I fixed this problem.

The first issue was that I had never generated an RSA public / private key pair. This can be done from the CYGWIN terminal with the following command:

ssh-keygen -t rsa

The system will respond with a message that it has generated a pair and asks for a file name -- take note of the folder it writes to -- In my case this was

/cygdrive/c/Documents and Settings/cjohnson/.ssh/id_rsa

In other words -- cygwin has decided to use a folder structure within my Windows profile.

I accepted all defaults -- in particular
I did not change the file name
no password
--- defaults for everything.

Now if you cd to the above mentioned folder you will probably find the following files

id_rsa
id_rsa.pub
known_hosts


To make the x2go client function you have to cp these files to new folders and rename them. Here's how

First -- here is the error message again

“Can’t read host RSA key C:\cygwin\etc\ssh_host_rsa_key.pub”

From this we can infer what public key file name and the folder x2go is expecting to find within cygwin.

In my case, the .\cygwin\etc folder existed -- so I just copied the id_rsa

cp /cygdrive/c/Documents\ and\ Settings/cjohnson/.ssh/id_rsa* /cygdrive/c/cygwin/etc/.

and changed the names to the default the x2go requires.

mv id_rsa ssh_host_rsa_key
mv id_rsa.pub ssh_host_rsa_key.pub

Once I did this the system then displayed a different error when loading that indicated it could not find the "authorized_keys" file in folder C:\cygwin\home\cjohnson\.ssh

A little exploration indicated thatthe "home…" folder structure was completely missing. So I constructed this folder structure

cd /cygdrive/c/cygwin
mkdir home
cd home
mkdir .ssh
cd .ssh

Then I copied the "known_hosts" file into this folder and renamed it as "authorized_keys"

cp /cygdrive/c/Documents\ and\ Settings/cjohnson/.ssh/known_hosts /cygdrive/c/cygwin/home/cjohnson/.ssh/authorized_keys

To make sure this file is writeable I modified permissions

chmod 600 authorized_keys

Now the client seems to be working OK. But I still can't get the web-browser plugin to work.

harley1977
09-03-2014, 15:37
Salve, io sto tentando di accedere con il mac dà il medesimo errore: Access denied. Authentication that can continue: publickey,password.
Sever acquistato su Kimsufi con questa configurazione:
Ubuntu Desktop 12.04 "Precise Pangolin" LTS + x2go (64bits). Programma utilizzato x2go
Ho fatto una marea di ricerche ma trovo soluzioni solo linux... Aiuto:muro: :muro: :muro:
Grazie...

pegasolabs
09-03-2014, 20:37
Non credo sia la sezione adatta. Chiuso anche perché la discussione è di 3 anni fa ;)