Link to home
Start Free TrialLog in
Avatar of booksplus
booksplus

asked on

telnet (with userId/password as parameters) ??

I've seen much discussion on this.  All  I want to do is have the CONVENIENCE of openning a telnet session from
dos to unix and pass the user id and password (so that I'm not prompted each and every time).

Here is the help for my particular dos telnet.  It seems there's not an easy way, but I hope there is.

telnet [-a][-e escape char][-f log file][-l user][-t term][host [port]]
 -a      Attempt automatic logon. Same as -l option except uses
         the currently logged on user's name.
 -e      Escape character to enter telnet client prompt.
 -f      File name for client side logging
 -l      Specifies the user name to log in with on the remote system.
         Requires that the remote system support the TELNET ENVIRON option.
 -t      Specifies terminal type.
         Supported term types are vt100, vt52, ansi and vtnt only.
 host    Specifies the hostname or IP address of the remote computer
         to connect to.
 port    Specifies a port number or service name.
ASKER CERTIFIED SOLUTION
Avatar of Drew Lake
Drew Lake

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of booksplus
booksplus

ASKER

How about just passing in user id?
telnet -l userid domain.host.com
^
|----------Is the correct syntax I think.
Well I guess there is a catch to what I'm saying.  Lets say your userid and password are the same for the remote computer and the PC your currently logged into you could then use: telnet -a domain.host.com  However this is the only way to pass both userid and password.
From my first posting here is the help when using -l
" -l      Specifies the user name to log in with on the remote system.
         Requires that the remote system support the TELNET ENVIRON option."

I tried "telnet -l userId domain.host.com" and it doesn't work.  Is there something to TELNET ENVIRON I have to do
on the unix side?

FYI - my unix password is not the same as my LAN password (dos password).
check out this link and see if this helps you any:  http://linux.math.tifr.res.in/manuals/man/telnet-nossl.html
use a telnet Shell, like the one provided by Win98 is much easier and much more efficient.
07aproan,

Could you please elaborate - thanks.
what i am trying to get to is:
to use another program to use telnet

for example you could try this :http://www.softlookup.com/display.asp?id=6814
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
try:

echo {password} | telnet -l {username}  host.com

but you really should not use telnet if you have any choice in the matter. SSH is much safer.