2

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:

Open
Password:

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 Jun 16 '17 at 3:01
  • Sorry, can you please specify the whole command? I don't think I get it. Thank you. – Eruel Santos Jun 16 '17 at 3:32
  • You're passing username with -l parameter, e.g. ssh -l user 192.168.1.1. Or if you doing connection from Linux-machine, you can connect in this way: ssh user@192.168.1.1. When connecting from Linux-machine, if you will not specify username, your system login name will be used. – Andrey Prokhorov Jun 16 '17 at 10:09
  • I'm still not convinced you have a username set outside of that line context appropriately ;) – quadruplebucky Jun 16 '17 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 Sep 14 '17 at 15:07
1

You provide credentials for

login local 

with

username joe secret blah

or

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. – Eruel Santos Jun 16 '17 at 7:34
0

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
0
  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 192.168.1.1
  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, privacy policy and cookie policy

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