Security note
The new option “-0” allows ONLY root login! So it’s not possible to log in with standard users “boxusrXX”!
Fritz!Box without USB memory
1. Here you must create the HASH code for your password. This must later be used instead of “myPassword”.
NOTE: don’t forget single quotes around myPassword. With their help the special characters in the code will be ignored.
2. Execute the commands below on the console. After that the Fritz!Box you should able to connect to your Fritz!Box using SSH and SFTP. You may use any SFTP Client you like. Use for logging in Username “root” and Password created in step 1 (Use your TRUE password and DO NOT USE the HASHCODE). Use standard port 22, if you have not specified another one.
3. If everything works ok, you can add the code into “debug.cfg”
Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# Untersuchung: mips oder mipsel Fritz!Box. # Darf nur einmal vor Benutzung von "$CPU" in debug.cfg eingetragen werden! if egrep -q 'AR9|AR10|VR9|Fusiv' /proc/cpuinfo ; then CPU='mips'; else CPU='mipsel'; fi DOWNLOADPAGE="https://fritzmod.net/download/$CPU" # Please select your version (latest selected): # BUSYBOX='busybox_1.20.2_' BUSYBOX='busybox_v1.21.1_' # DROPBEARMULTI='dropbearmulti_v2012.55_' # DROPBEARMULTI='dropbearmulti_v2013.58_' # DROPBEARMULTI='dropbearmulti_v2013.62_' DROPBEARMULTI='dropbearmulti_v2014.63.' # SFTPSERVER='sftp-server' SFTPSERVER='sftp-server_v6.6p1.'$CPU PASSWD='myPassword' TEMP=/var/tmp while !(ping -c 1 www.google.de); do sleep 5; done cd $TEMP wget -O busybox $DOWNLOADPAGE/$BUSYBOX$CPU wget -O dropbearmulti $DOWNLOADPAGE/$DROPBEARMULTI$CPU wget -O sftp-server $DOWNLOADPAGE/$SFTPSERVER chmod +x busybox chmod +x sftp-server chmod +x dropbearmulti $TEMP/busybox sed -e "/root:/s#^root:[^:]*:#root:$PASSWD:#" -i $TEMP/shadow ln -s $TEMP/dropbearmulti dropbearkey ln -s $TEMP/dropbearmulti dropbear $TEMP/dropbearkey -t rsa -f dropbear_rsa_host_key $TEMP/dropbearkey -t dss -f dropbear_dss_host_key $TEMP/dropbear -p 22 -r $TEMP/dropbear_rsa_host_key -d $TEMP/dropbear_dss_host_key -0 -S $TEMP/sftp-server |
Fritz!Box with USB memory
1. Download the files below and store them on the USB memory in directory “ssh”:
For mipsel-Fritz!Boxes (e.g. 7270, 7170 et al.):
- busybox1.9.0
- Download appropriate version, the latest (the first) is recommended:
- dropbearmulti_v2014.63 Paketeinstellungen:
- Add SFTP support
- With scp & ssh client
- With zlib Compression
- Disable DNS reverse-lookup of the client
- Build for non-freetz box
- dropbearmulti_v2013.62 Packet settings:
- Add SFTP support
- With scp & ssh client
- With zlib Compression
- Disable DNS reverse-lookup of the client
- dropbearmulti_v2013.58 Packet settings:
- Add SFTP support
- With zlib Compression
- Disable DNS reverse-lookup of the client
- paths set to /var/tmp/
- dropbearmulti_v2014.63 Paketeinstellungen:
- Download appropriate version, the latest (the first) is recommended:
For mips-Fritz!Boxes (e.g. 7390, 7340 et al.):
- busybox1.16.1
- Download appropriate version, the latest (the first) is recommended
- dropbearmulti_v2014.63 Paketeinstellungen:
- Add SFTP support
- With scp & ssh client
- With zlib Compression
- Disable DNS reverse-lookup of the client
- Build for non-freetz box
- dropbearmulti_v2013.62 Packet settings:
- Add SFTP support
- With scp & ssh client
- With zlib Compression
- Disable DNS reverse-lookup of the client
- dropbearmulti_v2013.58 Packet settings:
- Add SFTP support
- With zlib Compression
- Disable DNS reverse-lookup of the client
- paths set to /var/tmp/
- dropbearmulti_v2012.55
- dropbearmulti_v2014.63 Paketeinstellungen:
- Download appropriate version, the latest (the first) is recommended:
Please rename the downloaded busybox to “busybox” and downloaded dropbearmulti to “dropbearmulti”!
Advanced users may want to use another directory. Don’t forget to adjust the code accordingly.
2. Here you must create the HASH code for your password. This must later be used instead of “myPassword”.
NOTE: don’t forget single quotes around myPassword. With their help the special characters in the code will be ignored.
3. Run the commands below in the console. After that you should be able to reach the Fritz!Box with SSH and SFTP. You can use any SFTP client to connect. Login and Password using the data of step 2 (The password is YOUR Real PASSWORD; DO not USE THE Hash Code). If you have not modified the port number use standard port 22.
4. If everything works ok you can add the code sequence to “debug.cfg”
Code<img alt=”update” src=”/pics/menu/update.gif” />
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
HDD='Hitachi-HTS543216L9A300-01' # NOTE: MUST BE ADOPTED! HDD_ABSOLUT='/var/media/ftp/'$HDD PASSWD='myPassword' TEMP=/var/tmp while ! [ -d $HDD_ABSOLUT ] ; do sleep 5; done cd $TEMP cp $HDD_ABSOLUT/ssh/busybox $TEMP/busybox cp $HDD_ABSOLUT/ssh/dropbearmulti $TEMP cp $HDD_ABSOLUT/ssh/sftp-server $TEMP chmod +x busybox chmod +x sftp-server chmod +x dropbearmulti $TEMP/busybox sed -e "/root:/s#^root:[^:]*:#root:$PASSWD:#" -i $TEMP/shadow ln -s $TEMP/dropbearmulti dropbearkey ln -s $TEMP/dropbearmulti dropbear $TEMP/dropbearkey -t rsa -f dropbear_rsa_host_key $TEMP/dropbearkey -t dss -f dropbear_dss_host_key $TEMP/dropbear -p 22 -r $TEMP/dropbear_rsa_host_key -d $TEMP/dropbear_dss_host_key -0 -S $TEMP/sftp-server |