Changing NX server's port
http://www.john-james-andersen.com/blog/linux/custom-ports-with-nx-client-ssh.html
Edit your sshd_config file
- Edit the /etc/ssh/sshd_config file changing the line that says “Port 22″ to “Port {your_number}”
Edit your ssh_config file (Please note, you’ll only want to do this step if you are controlling the port your client on this machine will always look for in a connection)
- Edit the /etc/ssh/ssh_config file by changing the line that says “Port 22″ to “Port {your_number}”
Edit your server.cfg file
- Edit the /usr/NX/etc/server.cfg file by changing TWO lines.
*The first line you need to edit is: ‘#SSHDPort = “22″.’ You need to change that to (first, remove the # sign to make it active instead of being a comment): ‘SSHDPort = “{your_number}”.’
*The second line you need to edit is: ‘#SSHDAuthPort = “22″.’ You need to change that to (first, remove the # sign to make it active instead of being a comment): ‘SSHDAuthPort = “{your_number}”.’ If you don’t change this line, your NX Client will give a error saying: “Authentication failed for user {username}”.
Edit your node.cfg file
- Next, edit your /usr/NX/etc/node.cfg file by changing one line: ‘#SSHDPort = “22″.’ You need to change that to (first, remove the # sign to make it active instead of being a comment): ‘SSHDPort = “{your_number}”.’
Restart your Services
- Restart SSH by issuing the following Command: “/etc/init.d/sshd restart”
- Restart the NX Server by issuing the following Command: “/etc/init.d/nxserver restart”