Forum / NoMachine for Linux / Connecting to Ubuntu EC2 instance – "Cannot accept public key"
Tagged: ec2 linux
- This topic has 1 reply, 2 voices, and was last updated 9 years, 6 months ago by Tom.
-
AuthorPosts
-
June 11, 2015 at 13:51 #7428victorhooiParticipant
I am trying to use NoMachine 4 to connect from a OSX client to a Linux server. The server is an AWS EC2 instance running Ubuntu 15.04 Server.
I have installed Gnome 3.0 Desktop on the server. I then installed the NoMachine package (nomachine_4.6.4_13_amd64.deb).
I then followed these instructions from NoMachine (https://www.nomachine.com/AR10K00710) to setup Xvfb, as this is a headless machine:
export COOKIE=
ps -ef | md5sum | cut -f 1 -d " "
export AUTHFILE=$HOME/Xvfb-0.auth
xauth -f $AUTHFILE add :0 MIT-MAGIC-COOKIE-1 $COOKIE
xauth add :0 MIT-MAGIC-COOKIE-1 $COOKIE
Xvfb :0 -auth $AUTHFILE -screen 0 1024x768x24 &
DISPLAY=:0 nohup /etc/X11/Xsession gnome-session &
I then installed the NoMachine client on my OSX box, and attempted to connect via the NX protocol on port 4000. I get the error message “Error: Cannot accept public key”.
Below are the contents of the logfiles (created using the Save Logs button):
Info: Starting NoMachine version 4.6.4.
Info: Loading settings from ‘/Users/victorhooi/.nx/config/player.cfg’.
18942 779 10:38:49 666.543 Main: Set process to foreground role.
18942 779 10:38:49 666.565 Main: Creating the client session.
18942 779 10:38:49 666.719 ClientSession: Initializing session at 0x1022d7e90.
18942 779 10:38:51 437.840 ClientSession: Initialized session at 0x1022d7e90.
18942 779 10:38:51 438.571 Main: Entering the GUI event loop.
2015-06-11 10:40:00.327 nxplayer[18942:3671499] LSCopyItemInfoForURL() returned -50 for path .
18942 779 10:40:26 966.412 ClientSession: Starting session at 0x1022d7e90.
18942 779 10:40:26 968.209 ClientSession: Going to start session ‘/Users/victorhooi/.nx/config/Connection to 54.66.178.213.nxs’.
18942 779 10:40:26 978.029 Connection: Initializing connection at 0x11695ef20.
18942 779 10:40:26 978.112 Connection: Initialized connection at 0x11695ef20.
18942 779 10:40:26 978.126 Connection: Starting connection at 0x11695ef20.
18942 779 10:40:26 978.135 ClientDaemonConnector: Starting a new connection to host ‘54.66.178.213’ on port ‘4000’.
18942 779 10:40:26 978.793 Connection: Started connection at 0x11695ef20.
18942 779 10:40:26 984.579 ClientSession: Started session at 0x1022d7e90.
Info: Connection to 54.66.178.213 port 4000 started at 10:40:27 008.007.
18942 76559 10:40:27 743.556 ClientSession: The server certificate is not in the db.
18942 76559 10:40:27 743.614 ClientSession: Waiting for the user to accept the certificate.
18942 76559 10:40:29 864.922 DaemonLogin/DaemonLogin: ERROR! Error in context[B].
Error: Error in context[B].
18942 76559 10:40:29 864.962 DaemonLogin/DaemonLogin: ERROR! Error message ‘Cannot accept public key.’.
Error: Error message ‘Cannot accept public key.’.
18942 96407 10:40:29 865.683 DaemonClientApplication/DaemonClientApplication: WARNING! Session terminated abnormally.
18942 96407 10:40:29 865.706 DaemonClientApplication/DaemonClientApplication: WARNING! Error is 1, ‘Operation not permitted’.
Warning: Connection to 54.66.178.213 port 4000 failed at 10:40:29 865.719.
Warning: Error is 1, ‘Operation not permitted’.
18942 779 10:40:29 865.774 Connection: Connection at 0x11695ef20 failed.
18942 779 10:40:29 866.120 ClientSession: Runnable at 0x11695ef20 caused the session at 0x1022d7e90 to fail.
18942 779 10:40:29 866.135 ClientSession: Failing reason is ‘The session negotiation failed.
Error: Cannot accept public key’.
18942 779 10:40:29 874.004 ClientSession: Stopping session at 0x1022d7e90.
18942 779 10:40:29 884.408 Connection: Stopping connection at 0x11695ef20.
18942 779 10:40:29 884.630 ClientDaemonConnector: Stopping the current connection.
18942 779 10:40:29 884.869 Connection: Stopped connection at 0x11695ef20.
18942 779 10:40:29 899.616 ClientSession: Stopped session at 0x1022d7e90.
2015-06-11 10:40:32.480 nxplayer[18942:3671499] LSCopyItemInfoForURL() returned -50 for path .
Any thoughts on what’s going on?
June 15, 2015 at 13:12 #7486TomParticipantHello,
on the headless machine eg. on AWS EC2 navigate to the <user’s home>/.nx/ create directory ‘config’.
In the ‘config’ directory create file ‘authorized.crt’.
Copy to this file contents of your public key file, this file has the extension .pub.
After completing these steps you will be able to connect to the NoMachine using the private key.
-
AuthorPosts
This topic was marked as solved, you can't post.