6th Feb, 2014, 05:47 AM
I'd like to access my raspberry from outside of my LAN so I opened a new door on my router to ssh from office.
The problem is that if I open the port 22 I get a lot of script kid poking my ssh and I'd rather not.
I want to change the default port for ssh from 22 to a higher unused one.
But I noticed that changing /etc/ssh/sshd_config has no effect. After some digging I discovered that ssh is launched by inetd with the line:
and the ssh port is defined in
How do I change the ssh port?
Do I need to define a new service in /etc/services and launch it with inetd?
I'm running beta2:
The problem is that if I open the port 22 I get a lot of script kid poking my ssh and I'd rather not.
I want to change the default port for ssh from 22 to a higher unused one.
But I noticed that changing /etc/ssh/sshd_config has no effect. After some digging I discovered that ssh is launched by inetd with the line:
Code:
xbian@xbian ~ $ cat /etc/inetd.conf | grep ssh
ssh stream tcp nowait root /usr/sbin/tcpd /usr/sbin/sshd -i
xbian@xbian ~ $
and the ssh port is defined in
Code:
xbian@xbian ~ $ cat /etc/services | grep ssh
ssh 22/tcp # SSH Remote Login Protocol
ssh 22/udp
xbian@xbian ~ $
How do I change the ssh port?
Do I need to define a new service in /etc/services and launch it with inetd?
Code:
my_new_ssh 2222/tcp # SSH Remote Login Protocol on high port
my_new_ssh 2222/udp
my_new_ssh stream tcp nowait root /usr/sbin/tcpd /usr/sbin/sshd -i
I'm running beta2:
Code:
xbian@xbian ~ $ cat /etc/xbian_version
1.0Beta2
xbian@xbian ~ $