Tuesday, August 10, 2010

Change the SSh port on iPhone/iPod

Just changed my SSh port to an alternate one using the following (no, sshd_config won't do the trick!):

1.
echo "sshalt nnnn">>/private/etc/services
(editing the file directly seems to crash every time) -- The letter n in the command above, indicates a digit of the alternate port of your choice.

Edit: Btw, make sure you use BOTH of the carrots in the echo command! >> is good. > is well, you just hosed an important system file.

2.
Use the gTxtEdit app to edit /Library/LaunchDaemons/com.openssh.sshd.plist

3.
Look for SockServiceName and change it's string to sshalt:
SockServiceName
sshalt

4.
Save the file, reboot and enjoy!
 

No comments:

Post a Comment