New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Still able to connect to SSH via port 22 even after the port has been changed?
Got a really weird issue here, has a Debian 6 32 bit Xen VPS that I am playing around with, disabled OpenSSH and enabled Dropbear:
service ssh status
could not access PID file for sshd ... failed!
service dropbear start
Starting Dropbear SSH server:
And some relevant config lines for dropbear:
disabled because OpenSSH is installed
change to NO_START=0 to enable Dropbear
NO_START=0
the TCP port that Dropbear listens on
DROPBEAR_PORT=nnnn
where nnnn is the port I am changing to.
However, after I did all these and reloaded dropbear, I can still log in to SSH via port 22.
Anyone have seen something like this before?
Comments
Maybe there is another config file?
Maybe you have 2 dropbear instances (for example one running as standalone and other through xinetd)?
netstat -ltp
should show you what's listening on port 22.Do you have xinetd? Because then it would be the one listening on port 22.
What does netstat -l -p show?
Edit: maybe I should post quicker!
Did you restart Dropbear after modifying the config file?
Wow, LET is faster than any of the support desk of LEB providers, LOL:
Here you go:
netstat -ltp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 :www *: LISTEN 4355/nginx
tcp 0 0 :ssh *: LISTEN 9175/xinetd
tcp 0 0 :2202 *: LISTEN 6889/dropbear
tcp 0 0 :mysql *: LISTEN 4497/mysqld
I think @lbft is correct....how can I disable it though?
And thanks all for your help!
Found it, thanks to Google:
service ssh
{
socket_type = stream
only_from = 0.0.0.0
wait = no
user = root
protocol = tcp
server = /usr/sbin/dropbear
server_args = -i
->>>>>> disable = yes
}
Open: /etc/default/dropbear
Edit "DROPBEAR_PORT="
and then /etc/init.d/dropbear restart
Other options for "DROPBEAR_EXTRA_ARGS=":
@Adam: DROPBEAR_PORT=nnnn I have already set it to that value when I first posted, thanks a lot for your help though!