Cannot connect to EC2 Ubuntu instance

Forums / NoMachine for Linux / Cannot connect to EC2 Ubuntu instance

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #17916
    Avatardanielhand24
    Participant

    I followed the instructions out lined here:

    https://www.nomachine.com/accessing-your-remote-linux-desktop-on-amazon-elastic-compute-cloud-via-NoMachine

    However I still cannot connect to my instance “error cannot accept public key”. I couldn’t findĀ  .ssh/authorized_keys on my instance (didnt seem to be generated) so I uploaded my public key as found in puttygen from my .pem and renamed it as .nx/config/authorized.crt.

    Any ideas?

    #17960
    Avatardanielhand24
    Participant

    Has anyone tried connecting to a EC2 instance?

    #17968
    AvatarPaKac
    Contributor

    Hello,

    using the same steps in the tutorial, we tried to replicate your problem and were able to connect to an AWS EC2 instance (Ubuntu 16.04).

    After installation of NoMachine on Ubuntu, I did have to create the .nx directory since it was not created automatically. So, after you connect to your instance via ssh and install NoMachine, you might need to do the following:

    – create .nx directory manually (mkdir .nx)

    – create config directory inside .nx (mkdir config)

    – create file authorized.crt (touch authorized.crt)

    – view content of directory .ssh/authorized_keys and append it to .nx/config/authorized.crt (cat ~/.ssh/authorized_keys >> ~/.nx/config/authorized.crt)

    After you do this and follow the rest of instructions from tutorial you should be okay and able to connect. Let us know if it worked for you. Good luck.

    Greetings

    #17971
    Avatardanielhand24
    Participant

    The problem is I cannot find .ssh/authorized_key in my user area. I tried to copy my public key from puttygen on my PC to ~/.nx/config/authorized.crt in my user area. I can shh in with these keys.

    #17984
    AvatarPaKac
    Contributor

    Hello once again. You wrote that you can ssh to the remote machine with these keys which means that .ssh directory must be there.

    Once you are connected to EC2 Ubuntu via ssh, you can use ls -la to list all directories (including hidden) and then navigate to .ssh or use cd /home/YOURUSERNAME/.ssh command. It will take you directly to .ssh directory. Then try to proceed all the steps from tutorial.

    What version of NoMachine are you using?

Viewing 5 posts - 1 through 5 (of 5 total)

This topic was marked as solved, you can't post.