Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have this router: linksys WRT160NL

I am trying to ssh to it:

$ssh -l root -p 1522 192.168.1.1
DD-WRT v24-sp2 std (c) 2010 NewMedia-NET GmbH
Release: 08/07/10 (SVN revision: 14896)
[email protected]'s password: 
PTY allocation request failed on channel 0
shell request failed on channel 0

but i cannot login, what can i do?

share|improve this question
add comment

1 Answer

I was able to get in using key-based authentication.

First, go to the dd-wrt web interface and enable SSHd. It is under the SERVICES tab, SECURE SHELL. Enable SSHd, and disable PASSWORD LOGIN.

Go to your command line and generate your public key:

$bash-2.xx: ssh-keygen

This command generates a public key for you in ~/.ssh/id_rsa.pub. CAT the contents of that file and copy it to the dd-wrt web interface:

$bash-2.xx: cat ~/.ssh/id_rsa.pub

It will output something like this:

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD1SiwJqtKYZEuiHKSU8MDjEK9F5YZlrn8PPm0ZjZe4So7omWAf60c3oRtDCTrJGFapj/R3Mhh4X5QXDd1/qWdRD/FGxnK7Y2KvVSymB5UPD+O9zF6Otbp0MvL3G4fGYn+MJH1hjj3uFJvQ9Mm3+f1tWfLZl4PVirSitSYM5SL5LdtmCnmGTtjrDGnZfC6wCZCpB5B1vBjEV2XUKx0u7urQZKebp8VMiI0akeFX7N7Hmzmx7igaTmLsPvqbpA3YHvo4zxwtl8eBSMb2ilnLc2D5rGucin8HJvnuzGaa1zhAGshGT5M0lNby3hgPKDYHcKWx4a56+RZjiIn38WOCFHIt

Copy that into the AUTHORIZED KEYS field in dd-wrt's SERVICES>SECURE SHELL

Hit apply, then reboot the router from the REBOOT ROUTER button at the bottom of the interface page.

Now log in via ssh on the command line:

$bash-2.xx: ssh root@

All of this in on the dd-wrt wiki page: External SSH

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.