Unable to connect using FreeNX after cloning of a working ubuntu EC2 instance

1.5k views Asked by At

I have previously setup a EC2 instance on Ubuntu 10.04 and setup the necessary binaries to allow ssh and more the nomachine client on windows. This solution worked well.

I wanted to create another instance of the same setup , so i created a AMI image from the aws management console(browser) and launch a new instance using the image with the exact same keypair and security setting.

Expecting the instance to work exactly the same i tried to connect to it using SSH and FreeNX again.

Result:

SSH is working fine and my env look exactly the same.

NX is unable to connect.

When I try to login to NX it says "Authentication failed for user XXX"

On the windows side I checked the sshlog and get the following:

NX> 203 NXSSH running with pid: 6672
NX> 285 Enabling check on switch command
NX> 285 Enabling skip of SSH config files
NX> 285 Setting the preferred NX options
NX> 200 Connected to address: xx.xx.xx.xx on port: 22
NX> 202 Authenticating user: nx
NX> 208 Using auth method: publickey
HELLO NXSERVER - Version 3.2.0-74-SVN OS (GPL, using backend: 3.5.0)
NX> 105 hello NXCLIENT - Version 3.2.0
NX> 134 Accepted protocol: 3.2.0
NX> 105 SET SHELL_MODE SHELL
NX> 105 SET AUTH_MODE PASSWORD
NX> 105 login
NX> 101 User: XXX
NX> 102 Password: 
/usr/bin/nxserver: line 578: kill: (27690) - No such process
/usr/bin/nxserver: line 580: kill: (27690) - No such process
NX> 404 ERROR: wrong password or login
NX> 999 Bye
NX> 280 Exiting on signal: 15

Any idea why this might be happening or how to fix it?

1

There are 1 answers

1
Alex On

I had the same problem and I resolved by clearing the known_hosts file in the nx folder, i.e. /var/lib/nxserver/home/.ssh/known_hosts

  1. Make first a backup of this file sudo cp /var/lib/nxserver/home/.ssh/known_hosts /var/lib/nxserver/home/.ssh/known_hosts.bck

  2. Remove the original file sudo rm /var/lib/nxserver/home/.ssh/known_hosts

  3. Generate a new empty file sudo touch /var/lib/nxserver/home/.ssh/known_hosts