Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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)
root@192.168.1.1'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

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .