Reply To: Cannot accept public key when connecting to e2c instance running RHEL

NoMachine for Linux / Cannot accept public key when connecting to EC2 instance running RHEL / Reply To: Cannot accept public key when connecting to e2c instance running RHEL

#8359
pvnpvn
Participant

After staring 2 hours to this issue, found the mistake. Chose wrong location  for the authorized.crt (while doing it correct for the nx user…)

## Add new public key to authorized.crt of ec2-user

mkdir -p /home/ec2-user/.nx/config
sed ‘s/.*[[:space:]]\(ssh-dss[[:space:]][^[:space:]]*\).*/\1/’ /var/NX/nx/.ssh/default.id_dsa.pub >>  /home/ec2-user/.nx/config/authorized.crt
chown ec2-user:root /home/ec2-user/.nx/config/authorized.crt
chmod 0644    /home/ec2-user/.nx/config/authorized.crt