Thursday, 25 June 2009

Running a second SSHD on a different port, different config

from http://www.macresearch.org/tutorial_ssh_to_alternate_ports_and_enabling_multiple_ssh_daemons

Running a second SSHD on a different port, different config

1) cd into /System/Library/LaunchDaemons
There is a file called ssh.plist in that directory. Make a copy of it:
2) sudo cp ssh.plist ssh2.plist
3) Edit the file ssh2.plist changing the following lines (below is a diff of the two files) but only change ssh2.plist:

--- ssh.plist 2006-10-13 12:06:19.000000000 -0500
+++ ssh2.plist 2006-10-16 11:31:22.000000000 -0500
@@ -3,7 +3,7 @@


Label
- com.openssh.sshd
+ com.openssh2.sshd

@@ -23,7 +23,7 @@
SockServiceName
- ssh
+ ssh2


1) Edit the file /etc/services making the following changes:

ssh 22/udp # SSH Remote Login Protocol
ssh 22/tcp # SSH Remote Login Protocol


add

ssh2 9222/tcp # SSH Remote Login Protocol #2
ssh2 9222/tcp # SSH Remote Login Protocol #2


No comments:

Post a Comment