03-30-2016 02:33 AM - edited 03-08-2019 05:09 AM
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?
Solved! Go to Solution.
03-30-2016 07:48 PM
Hi!
The commands used in your command prompt should be:
ssh -l admin 10.1.5.26 <<<< Being admin your user.
Best regards!
JC
03-30-2016 06:22 AM
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
03-30-2016 11:39 AM
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.
03-30-2016 07:48 PM
Hi!
The commands used in your command prompt should be:
ssh -l admin 10.1.5.26 <<<< Being admin your user.
Best regards!
JC
03-31-2016 03:09 AM
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
07-04-2025 04:42 AM
without this command and also privilege level 15 under line vty 0 4 and 5 to 15 , SSH won't work.
This command on this thread helped me to resolve connection timeout from one switch to another switch while logging into it using SSH.
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