Here is the running-config for the line vty:

line vty 0 4
password 1111
login local
transport input ssh
line vty 5 15
password 1111
login local
transport input ssh

However, when I type ssh -l domain-name ip-address, the cmd will show:


Since it is in login local, it should ask for a user account, but it doesn't. Also, it accepts the password "1111", when as far as I know, should only be accepted if it is in login only.

  • So local username configured, no tacacs and no radius right? add ssh -v 2 to your cmd and check the outcome
    – DRP
    Commented Jun 16, 2017 at 3:01
  • Sorry, can you please specify the whole command? I don't think I get it. Thank you. Commented Jun 16, 2017 at 3:32
  • You're passing username with -l parameter, e.g. ssh -l user Or if you doing connection from Linux-machine, you can connect in this way: ssh [email protected]. When connecting from Linux-machine, if you will not specify username, your system login name will be used. Commented Jun 16, 2017 at 10:09
  • I'm still not convinced you have a username set outside of that line context appropriately ;) Commented Jun 16, 2017 at 11:53
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer.
    – Ron Maupin
    Commented Sep 14, 2017 at 15:07

3 Answers 3


You provide credentials for

login local 


username joe secret blah


aaa new-model
aaa authentication login default enable

The password alone lets you because you set it in line context and it falls through as old style vty login....`

  • I think I have set everything correctly. In telnet, login and login local work fine. In ssh, they don't. Whether it is login or login local, the password "1111" is accepted. Commented Jun 16, 2017 at 7:34

Have you generated a crypto key, which is needed for ssh authentication?

Command to generate:

crypto key generate rsa

Modulus: 1024

Also an k9 IOS Version on the device is needed i. e. universalk9 You could find out what your device is running with:

show version
  1. Create a local username and password on the device
    username john secret YourPassword priv 15
  2. Generate SSH keys
    crypto key generate rsa modulus 2048
  3. Remove the password from line configuration
    line vty 0-15
    no password
  4. From Mac or Linux, connect with username
    ssh -l john
  5. Or use PuTTY.

Additional information Configuring Secure Shell on Routers and Switches Running Cisco IOS

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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