{"id":429,"date":"2018-05-04T14:29:07","date_gmt":"2018-05-04T19:29:07","guid":{"rendered":"https:\/\/www.soljerome.com\/blog\/?p=429"},"modified":"2018-05-04T14:30:47","modified_gmt":"2018-05-04T19:30:47","slug":"nomachine-ssh-host-key-update","status":"publish","type":"post","link":"https:\/\/www.soljerome.com\/blog\/2018\/05\/04\/nomachine-ssh-host-key-update\/","title":{"rendered":"NoMachine ssh host key update"},"content":{"rendered":"<p>I recently ran into an issue where I needed to update the SSH host keys on a machine which was running NoMachine. In the process, I came across the following annoying error which was not at all indicative of the actual issue<\/p>\n<pre>\r\n-- NX SERVER START: -c \/usr\/bin\/nxserver - ORIG_COMMAND=\r\n-- NX SERVER START:  - ORIG_COMMAND=                    \r\nInfo: Using fds #4 and #3 for communication with nxnode.\r\nHELLO NXSERVER - Version 3.2.0-74-SVN OS (GPL, using backend: not detected)\r\nNX> 105 hello NXCLIENT - Version 3.2.0\r\nNX> 134 Accepted protocol: 3.2.0\r\nNX> 105 SET SHELL_MODE SHELL                            \r\nNX> 105 SET AUTH_MODE PASSWORD  \r\nNX> 105 login\r\nNX> 101 User: awesomeuser\r\nNX> 102 Password:\r\nInfo: Closing connection to slave with pid 6424.\r\nNX> 404 ERROR: wrong password or login          \r\nNX> 999 Bye\r\n<\/pre>\n<p>I verified repeatedly that other methods for logging in were working properly. This problem was due to us using the <em>SSH<\/em> protocol for NoMachine logins. Unfortunately, this error is also not at all useful because it doesn&#8217;t show the actual problem. The problem was that the &#8220;nxserver&#8221; user had a known_hosts file containing the old ssh host key and for some reason it wouldn&#8217;t allow me to accept the new one. I simply removed the old key.<\/p>\n<pre>\r\n# rm \/var\/lib\/nxserver\/home\/.ssh\/known_hosts\r\nrm: remove regular file `\/var\/lib\/nxserver\/home\/.ssh\/known_hosts'? y\r\n<\/pre>\n<p>Once the old key was removed, I was once again able to login successfully. Curiously, the known_hosts file was not regenerated. I&#8217;m not exactly sure how it wound up there to begin with since this setup was created before I arrived.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I recently ran into an issue where I needed to update the SSH host keys on a machine which was running NoMachine. In the process, I came across the following annoying error which was not at all indicative of the actual issue &#8212; NX SERVER START: -c \/usr\/bin\/nxserver &#8211; ORIG_COMMAND= &#8212; NX SERVER START: &#8211; <a href='https:\/\/www.soljerome.com\/blog\/2018\/05\/04\/nomachine-ssh-host-key-update\/' class='excerpt-more'>[&#8230;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3,11],"tags":[],"_links":{"self":[{"href":"https:\/\/www.soljerome.com\/blog\/wp-json\/wp\/v2\/posts\/429"}],"collection":[{"href":"https:\/\/www.soljerome.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.soljerome.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.soljerome.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.soljerome.com\/blog\/wp-json\/wp\/v2\/comments?post=429"}],"version-history":[{"count":4,"href":"https:\/\/www.soljerome.com\/blog\/wp-json\/wp\/v2\/posts\/429\/revisions"}],"predecessor-version":[{"id":433,"href":"https:\/\/www.soljerome.com\/blog\/wp-json\/wp\/v2\/posts\/429\/revisions\/433"}],"wp:attachment":[{"href":"https:\/\/www.soljerome.com\/blog\/wp-json\/wp\/v2\/media?parent=429"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.soljerome.com\/blog\/wp-json\/wp\/v2\/categories?post=429"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.soljerome.com\/blog\/wp-json\/wp\/v2\/tags?post=429"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}