Skip to main content
Visitor II
June 26, 2024
Solved

How to change the port of dropbear SSH

  • June 26, 2024
  • 1 reply
  • 1641 views

Hi

I'm using the OpenSTlinux starter package.

I want to change the SSH port communicated by dropbear from 22.

Setting a file in the device and rebooted, but it doesn't change from SSH port 22.

file:  /etc/default/dropbear

DROPBEAR_PORT=10022 *line added

"DROPBEAR_EXTRA_ARGS" setting will take effect after the change.

Is it possible to change the SSH port in dropbear settings?​

Best regards,

Best answer by Christophe Guibout

Hello @take_4,

 

To change Dropbear SSH port from 22 to 10022, you need to update the following file : /lib/systemd/system/dropbear.socket:

-ListenStream=22
+ListenStream=10022

This file is also available as a symbolic link in etc folder: /etc/systemd/system/sockets.target.wants/dropbear.socket

 

BR,

Christophe

1 reply

Christophe Guibout
ST Employee
July 1, 2024

Hello @take_4,

 

To change Dropbear SSH port from 22 to 10022, you need to update the following file : /lib/systemd/system/dropbear.socket:

-ListenStream=22
+ListenStream=10022

This file is also available as a symbolic link in etc folder: /etc/systemd/system/sockets.target.wants/dropbear.socket

 

BR,

Christophe

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.