04-11-2022 09:07 AM
i am trying to build ssh connection but i am constantly running errors. First of all I dont understand accessing with hostname or defining username and password. When i try to pen ssh connection i am getting error Connection to 10.0.0.1 closed by foreign host. Please help
Boss(config)#enable secret kics
Boss(config)#line vty 0 4
Boss(config-line)#password ccna
Boss(config-line)#transport input ssh
Boss(config-line)#login local
Boss(config-line)#exit
Boss(config)#ip domain-name caseStudy
Boss(config)#crypto key generate rsa
On user Side is type
Router>ssh -l caseStudy 10.0.0.2
Password:
% Login invalid
Password:
% Login invalid
Password:
Please help and guide
Solved! Go to Solution.
04-11-2022 11:39 AM
This is the essence of your problem
line vty 0 4
password kics
login local
and
i am entering line console pswd
You are trying to use the line password but have configured the vty for login local which is expecting to authenticate with a locally configured user name and password. Either you need to configure a user name and password or you need to change the config of the vty to use the line password.
04-11-2022 11:54 AM
Assuming that you want to use the vty line password to authenticate then try this
line vty 0 4
no login local
login
and make sure that the configuration does not include aaa new-model.
04-11-2022 10:00 AM
have you created username and password:
username user1 password mypassword
enable password mypassword
04-11-2022 10:08 AM
i am trying to access with domain name
04-11-2022 10:09 AM
and why it asks for password 3 times and then connection closed by remote host. which password i am supposed to enter.? i am entering line console pswd
04-11-2022 10:16 AM
Hello,
post the full running configuration (sh run) of the BOSS device, as well as the output of:
sh ip shh
04-11-2022 10:28 AM - edited 04-11-2022 10:29 AM
Boss#show running-config
Building configuration...
Current configuration : 793 bytes
!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Boss
!
!
!
enable secret 5 $1$mERr$hx5rVt7rPNoS4wqbXKX7m0
!
!
!
!
!
!
ip cef
no ipv6 cef
!
!
!
!
license udi pid CISCO2901/K9 sn FTX1524RAL0-
!
!
!
!
!
!
!
!
!
ip domain-name caseStudy
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface GigabitEthernet0/0
ip address 10.0.0.2 255.0.0.0
duplex auto
speed auto
!
interface GigabitEthernet0/1
no ip address
duplex auto
speed auto
shutdown
!
interface Vlan1
no ip address
shutdown
!
ip classless
!
ip flow-export version 9
!
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
password kics
login local
transport input ssh
line vty 5 15
password kics
login local
transport input ssh
!
!
!
end
04-11-2022 11:39 AM
This is the essence of your problem
line vty 0 4
password kics
login local
and
i am entering line console pswd
You are trying to use the line password but have configured the vty for login local which is expecting to authenticate with a locally configured user name and password. Either you need to configure a user name and password or you need to change the config of the vty to use the line password.
04-11-2022 11:41 AM
04-11-2022 11:54 AM
Assuming that you want to use the vty line password to authenticate then try this
line vty 0 4
no login local
login
and make sure that the configuration does not include aaa new-model.
04-11-2022 04:07 PM
thanks it helped in ssh login. can you please guide me when i enter password for privildge mode it takes 3 attempts and then give error .. bad secret its not moving forward
Router>ssh -l caseStudy 10.0.0.1
Password: cisco
Boss>en
Password:
Password:
Password:
% Bad secrets
Boss>en
Password:
Password:
Password:
% Bad secrets
Boss>
04-12-2022 01:46 AM
This is a bit puzzling. The show run in a previous response shows an encrypted enable password. If you were able to make the config changes to get SSH to work then it would seem that you had the correct enable password. The enable password you used to make the config changes should work for SSH. If the enable password is not working with SSH I wonder if it might be something like caps lock being on?
Do you still have the ability to make config changes using the console connection? If so you might try changing the enable secret and then try the new password with SSH.
06-04-2024 08:04 PM
may be you need use line password
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide