SSH - change password, port, disable/enable
Default SSH authentication used in Public versions or old versions (prior to 0.2.14-r8):
Login: root
Password: 930920
Port: 22
Attention!!! Beginning from version 0.2.14-r8 the changes were implemented in the security system.
SSH is locked - In Factory version (versions created by Manufacturer to be put on Manufacturer's or Operator's web server for auto-update and used for a manual update from Embedded portal).
SSH is open at standard TCP port (22) - In Public versions from Manufacturer (which are provided in Releases at soft.infomir.com).
For image versions created by Operators can be disabled/enabled SSH.
Port configuration
Default TCP port value used for SSH (22) can be changed to another permissible value in working STB separately for each STB or it can be changed in the entire software version within the image building process.
MAG2xx (STMicroelectronics chipsets based)
- Open in the Rootfs next file (in edit mode): /etc/openssh/sshd_config
Make changes to the #Port line. For example to change the port value to 2222:
#Port 2222
- Save changes.
Note. To enable new settings in working STB, reset STB after reconfiguring.
MAG-3xx (Broadcom chipsets based)
- Open in rootfs next file (in edit mode): /etc/rc.d/rcS.d/S60netsrv
Make changes to the line dropbear. For examle to change port value to 2222:
dropbear -p 2222 - Save changes.
Note. To enable new settings in working STB, reset STB after reconfiguring.
MAG-4xx (Hisilicon chipsets based)
- Open in rootfs next file (in edit mode):/etc/init.d/S81dropbear
Make changes to the line TARGET_BIN=/sbin/dropbear - append to the end of record new port value as follows: -p <Port_number>. For examle to change port value to 2222:
TARGET_BIN="/sbin/dropbear -p 2222"
- Save changes.
Note. To enable new settings in working STB, reset STB after script modification.
How to change SSH password for image-making
1. Login via SSH on STB
2. Run
3. Copy contents of the next file:
For MAG250/254/270 -
/etc/shadow For MAG256, 322/324/349/351 -
/etc/passwd For MAG420/424 -
/etc/shadow
4. Insert (substitute) copied contents into the body of the same named file that is a part of the RootFS that will be used for further building the image.
How to disable/enable SSH connection
Disabling SSH connection
You can disable SSH access in working STB, separately for each STB, (to apply new settings reboot STB) or it can be changed in entire software version within image building process.
To disable SSH access:
- MAG2xx - delete the script files etc/rcS.d/S30ssh and /usr/sbin/sshd
- MAG3хх - comment the string dropbear in the script file /etc/rc.d/rcS.d/S60netsrv
- MAG4хх - comment the string TARGET_BIN=/sbin/dropbea in the script file /etc/init.d/S81dropbear
Enabling SSH connection
To resume SSH connection support on STB you should update STB to a version with enabled SSH access.
To enable SSH access in new image versions, restore in the Rootfs the original version of the above-specified script files. The original version of the script files is provided in Release.