cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
83668
Views
0
Helpful
4
Replies

Connection closed by foreign host

Valeriek76
Level 1
Level 1

I'm a student in IT and in packet Tracer we created a network with switches.
Now I configured the ssh for  remotely connection from one of the pc's.
Because it's in packet Tracer I only can use cmd-prompt (no putty or TeraTerm)

My configuartion:

 #conf t
(config)#ip domain-name MYVCaseStudy
(config)#crypto key generate rsa  (set on 1024 bits)
(config)#username admin password ccna
(config)#line vty 0 4
(config-line)#transport input ssh
(config-line)#login local
(config-line)#end


But when I use cmd for connection he doesn't open with the password and afetrwards he gives me a [connection to 10.5.1.26 closed by foreign host]



Is there anyone who can help me with this problem?

1 Accepted Solution

Accepted Solutions

Hi!

The commands used in your  command prompt should be:

ssh -l admin 10.1.5.26        <<<<  Being admin your user.

Best regards!

JC

View solution in original post

4 Replies 4

devils_advocate
Level 7
Level 7

Presumably the error comes up after you type the password in three times?

Try giving your user privilege level 15:

username admin privilege 15 password ccna

Its also good practice to use secret instead of password when creating users on the IOS.

Thanks

Thank you for your answer.
The only thing I don't understand is why it keeps asking the password 3 times (even after I set it to your example: username admin privilege 15 password ccna).

I tried it with the user privilege level, but the result remains the same.
I know it's best to use secret, for the privilege mode I use it always.
But in this case the schoolltask says we need to do it with user admin password ccna.


Hi!

The commands used in your  command prompt should be:

ssh -l admin 10.1.5.26        <<<<  Being admin your user.

Best regards!

JC

Thank you very very much, You can't believe how happy I am with the solution.
If I look it now it's logical and a stupid mistake by me.
Thank you very much

Review Cisco Networking products for a $25 gift card