1847108 Members
5061 Online
110263 Solutions
New Discussion

Re: Telnet question

 
intp
Frequent Advisor

Telnet question

I'm using telnet to connect to unix servers.

how to write a batch file or any shortcut
that would take me directly to prompt?
meaning to skip userid /pwd step. also how to avoid from others viewing this batch file which might have my uid/pwd in it?

it may not be a good practice to do so..but we have so many boxes to connect ...very hard to remember all pwds.

THANKS.
6 REPLIES 6
Olivier Masse
Honored Contributor

Re: Telnet question

You cannot do this without running an automation software such as expect. As you said this is not recommended.

I'd rather consider using SSH with public key authentication if you want to login without providing a password.
Torsten.
Acclaimed Contributor

Re: Telnet question

rlogin may be an option, but it is very unsafe too. ssh is a good option like mentioned in the post above.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
John E.Ophious
Regular Advisor

Re: Telnet question

Setting this up using ssh would be your best and most secure option. rlogin would be easy as well, but as the other posters have said not recommended.

G'day mate,

John E. Ophious
TKeller
Frequent Advisor

Re: Telnet question

You could do it pretty easily enough, but while I recommend at least using arguments in place of putting your username/password in a file, that's still tracked through your history (unless you turn that off or clear your history daily).

One other thing you might be able to do, which is a bit more secure, is trust your centralized workstation to all the servers with a .rhosts file that basically looks like this:

+

This way, you can rlogin into any box that has that .rhosts file with your username and won't have any passwords. I'm going to assume that you're not going to do that as root.
Make sure you have it chmod'd 600 so prying eyes don't see.

While this is a workable answer, I'd look for something else.
It is said you should treat your body like a temple. I treat mine like an amusement park.
Sung Oh
Respected Contributor

Re: Telnet question

Hello,

if you are thinking about executing command line via telnet, you can consider using remsh command.
http://docs.hp.com/en/B9106-90007/remsh.1.html

Regards,
Sung
Dave La Mar
Honored Contributor

Re: Telnet question

And of course, you could install Reflections and automate your logins.
Regardless of the way you go, keep in mind an automated login is a security risk if exposed to users other than the one intended to use it.

Regards,

dl
"I'm not dumb. I just have a command of thoroughly useless information."