cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
11679
Views
1
Helpful
11
Replies

[Connection to 10.0.0.1 closed by foreign host

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

 

2 Accepted Solutions

Accepted Solutions

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.

HTH

Rick

View solution in original post

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.

 

HTH

Rick

View solution in original post

11 Replies 11

balaji.bandi
Hall of Fame
Hall of Fame

have you created username and password:

 

username user1 password mypassword

enable password mypassword

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

i am trying to access with domain name

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

Hello,

 

post the full running configuration (sh run) of the BOSS device, as well as the output of:

 

sh ip shh

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

 

 

 

 

 

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.

HTH

Rick

can you tell me how to configure line vty?

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.

 

HTH

Rick

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>

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.

HTH

Rick

may be you need use line password

Review Cisco Networking for a $25 gift card