01-14-2013 08:29 AM
hello
I am trying to login to network devices which are enabled for SSH only. With my script, it doesnt allow me to logon.
Is there a command specific to SSH that is blocking me from accessing devices related to keys? my script worked with telnet , all i changed was the port number.
thanks for helping
Solved! Go to Solution.
01-14-2013 09:15 AM
Hi TFG_Cisco,
Im not to good with scripting but, if you JUST changed the port number from 23 to 22 for example that will not be enough.
Telnet call both username and password. for example telnet 10.10.10.10 then you will be prompted for a username and password...
With SSH. you need to specify the user with -l tag. for example ssh -l admin 10.10.10.10 then you will be prompted for just the password.
So I assume at the moment your script has 3variables:-
$IP_ADD
$USR_NAME
$PASSWORD
You will need to add another variable to add the -l before $USR_NAME tag, for SSH logins. OR have the variable add the -l automatically before the username if the script will not be used for telnet again
Let me know if this helps.
Ignore the above, I think the issue you are having is discussed in the link below.
http://www.orcsweb.com/blog/james/fun-with-powershell-plink-cisco-ios-and-powershell/
Kind Regards,
Liam
01-14-2013 09:15 AM
Hi TFG_Cisco,
Im not to good with scripting but, if you JUST changed the port number from 23 to 22 for example that will not be enough.
Telnet call both username and password. for example telnet 10.10.10.10 then you will be prompted for a username and password...
With SSH. you need to specify the user with -l tag. for example ssh -l admin 10.10.10.10 then you will be prompted for just the password.
So I assume at the moment your script has 3variables:-
$IP_ADD
$USR_NAME
$PASSWORD
You will need to add another variable to add the -l before $USR_NAME tag, for SSH logins. OR have the variable add the -l automatically before the username if the script will not be used for telnet again
Let me know if this helps.
Ignore the above, I think the issue you are having is discussed in the link below.
http://www.orcsweb.com/blog/james/fun-with-powershell-plink-cisco-ios-and-powershell/
Kind Regards,
Liam
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