I've managed to find a solution (nothing helped me on internet...), I've tried many things as change port in /etc/default/dropbear
or etc/init.d/dropbear
without any effect...
So, after searching how initramfs works and how dropbear is launched at boot, here is the solution:
$ cd /usr/share/initramfs-tools/scripts/init-premount
$ nano dropbear
then go to the function run_dropbear()
, you should find a line with something like this:
exec /sbin/dropbear ${DROPBEAR_OPTIONS:-$PKGOPTION_dropbear_OPTION} -Fs
Just add the following option at the end of line:
exec /sbin/dropbear ${DROPBEAR_OPTIONS:-$PKGOPTION_dropbear_OPTION} -Fs -p #### (where #### is your port number)
Don't forget to run update-initramfs -u
after this modification.
Reboot. Your SSH at boot time should now be on the chosen port.
Cheers