packetstormer
Regular Member
- My Satellite Setup
- 1.1m Triax dish, TM2300 motor. 2 x DM800HD, 1 DM500, 2 x Sly HD. 1 60cm fixed (Astra 2D).
- My Location
- Ireland
I had been searching everywhere for information on how to disable SSH password prompts and only allow access with a Private Key. There seems to be a lot of information suggesting performing a LOT of unnessacary tasks.
The benifit to running SSH to you Drembox is that you can securly connect (unlike Telnet which sends username/password in cleartext) and tunnel any traffic through the secure tunnel - Streaming etc.
Below is a simpy few steps on how to get this up and running. This was tested on a BH0.12 image. I would image DreamElite is the same, I have that on my other box and will test that too.
There is a good chance other images have slightly different compilations of Dropbear so I can't say this will work on them
The benifit to running SSH to you Drembox is that you can securly connect (unlike Telnet which sends username/password in cleartext) and tunnel any traffic through the secure tunnel - Streaming etc.
Below is a simpy few steps on how to get this up and running. This was tested on a BH0.12 image. I would image DreamElite is the same, I have that on my other box and will test that too.
There is a good chance other images have slightly different compilations of Dropbear so I can't say this will work on them
- Telnet to the Dreambox and login as the root user.
- If you have not already done so type: passwd and enter a new root password
- type cd /home/root
- type mkdir .ssh
- Next, leave the Telnet session open and jump to you browser and download PuttyGen (httx://www.chiark.greenend.org.uk/~sgtatham/putty/download.html).
- Run PuttyGen, enter a passphrase and click the Generate button. Move the mouse around the screen to randomly generate your key
- NOTE: You don't have to use PuttyGen to generate your key, you can use other usual methods such as the CLI on the DM and run dropbearconvert. PuttyGen is by far the easiest
- Once PuttyGen has finished generating the key click the "Save Private Key" button and save the ppk file to a safe location - you will need this later to connect via SSH
- Jump back to telnet session you have open and type cat > /home/root/.ssh/authorized_keys
- When you press enter the screen will jump to the next line and wait for text to be inputted
- From the PuttyGen app select all of the private key and then copy
- Right click inside the telnet session to paste the contents of the key
- Press Return the CTRL+D to exit from the command
- Type cat /home/root/.ssh/authorized_keys and check the output to make sure the key pasted correctly.
- You can now test the connection - try Putty from Windows making sure you select the SSH->Auth option and pointing the app to the private key you saved away earlier
- At this stage you should get connected and prompted for the passphrase you setup earlier.
- If the connection works correctly you may now want to disable SSH from accepting any connects that don't use key authentication. This will not effect your telnet connection
- From you Windows/Linux box ftp to the Dreambox
- cd /etc/init.d
- bin
- hash
- get dropbear
- Exit the ftp session
- Copy the dropbear file to another file as a backup then open the dropbear file in an editor, I used WinVi
- Find the line "DROPBEAR_EXTRA_ARGS=" and make it look like the next line
- DROPBEAR_EXTRA_ARGS="-s -g"
- Save the file and ftp it back to the Dreambox to the same location
- Telnet into the Dreambox and issue this command: /etc/init.d/dropbear restart
- You should now configure your ISP router to only allow SSH to your Dreambox, disabling Telnet, HTTP etc.
- You can now securly SSH into the Dreambox and tunnel any traffic you might need through the connection.
- None of the above changes will change any Telnet session and you should still be able to Telnet from within your LAN