Reg : telnet password issue


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Reg : telnet password issue
# 1  
Old 11-28-2007
Reg : telnet password issue

Hi All,

I am working on AIX 5.3.

My requirement is to telnet to a server and scp a file from another server
In my shell script i am using telnet to enter to a server and i am echoing the password as below

echo open $Infahost
sleep 1
echo $Infaftplogin
sleep 1
echo $Infaftppasswd
sleep 1

i am getting this as the output....

telnet> Trying...
Connected to kaathr67.
Escape character is '^]'.
getwinsize:ioctl: A specified file does not support the ioctl system call.


telnet (kaathr67)

trysrc
4crows
/usr/local/bin/scp pickme@bridge.share.com:../internal/cmd_ltp* /u98_data/pcenterdata/prod/FTP/cmd_ltp_Extract_20071104_101836.txt

















Attention:


Ths is a restricted computer system and is for authorized use only.
Unauthorized use of this system may result in disciplinary action
and/or civil and criminal penalties. Failure to maintain the
confidentiality of sensitive information may subject the user to
penalties under applicable laws. By using this system, the user consents
to monitoring, inspection, and disclosure of all activity for
security purposes.


Authorized Login: trysrc's Password:
/dev/pts/141: Password read timed out -- possible noise on port
Connection closed.

telnet>

whenever i am running the script for the first time i getting this error.
when i rerun it is working fine...This has been repeating for the past few runs...

please advice
sam

Last edited by sam99; 11-28-2007 at 04:08 AM..
# 2  
Old 11-28-2007
Quote:
Originally Posted by sam99
getwinsize:ioctl: A specified file does not support the ioctl system call.
stdin is evidently not a terminal or pseudo-terminal. telnet prefers to work directly with terminals.

Can you not use ssh instead of telnet?
# 3  
Old 11-28-2007
i am using telnet to login to a server as user trysrc.
Only trysrc has the permission to run the command scp in our AIX server.

i am calling the shell script cmd_scp as

sh -c 'cmd_scp | telnet'

Could you please tell me how to login using ssh...

sam
# 4  
Old 11-28-2007
ssh user@host
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Telnet issue

In the below script, i want to check telnet port status of list of servers, here where ever port working i am getting output. where ever port is not working (where ever trying) there it's command stuck, there it's needed manual interruption like ctrl+c. without interception i want run this... (1 Reply)
Discussion started by: rajiv
1 Replies

2. Shell Programming and Scripting

Not able to pass Username and Password in telnet session

I have created a shell script to telnet remote machine. Here is the problem I am not able to pass the login username and password to the telnet session. I have searched forum and got few other methods to achieve this. But I need to know what's wrong in the below script. username="root"... (2 Replies)
Discussion started by: uxpassion
2 Replies

3. Shell Programming and Scripting

reg accepting password

Hi, I want to login to many systems and password should be taken automatically from a file(login is working but password is not accepting). Any help on this is appreciable . My code. for i in `cat /tmp/tes ` ====>tes file contain list of hosts > do ssh $i > perl prog.pl >... (1 Reply)
Discussion started by: rogerben
1 Replies

4. UNIX for Advanced & Expert Users

Different root password between ftp and telnet

Hello All, I hope somebody can help me I used to work to client using solaris 2.5.1 using telnet to explore disk and ftp to archive data. There is one tester which I can connect using root password using putty but always keep rejecting me when i'm using root password using FTP. Are the... (7 Replies)
Discussion started by: sawrio
7 Replies

5. Shell Programming and Scripting

Telnet usename and password

I am creating a spec file for RPM and I have a shell script that I am working on. The ojective to to telnet to a server, switch to the appropriate directory, run another shell script and then exit once the script is completed. telnet <ipaddress> echo <user> echo <pass> echo cd <directory>... (7 Replies)
Discussion started by: mastachef
7 Replies

6. Shell Programming and Scripting

Reg: SCP issue

Hi , I am beginner in aix... i am using the following command in my shell script to to copy the files from a secured server to my aix box... /usr/local/bin/scp pickme@brad.wanted.com:../internal/mem_grp_details* Should i use sleep command in my shell script for the script to copy the... (15 Replies)
Discussion started by: sam99
15 Replies

7. Shell Programming and Scripting

telnet issue

Hi , i am a beginner in AIX. please find my doubt I am calling the below script named test_1 by " sh test_1 | telnet " cmd1="var1=100" echo open $Infahost sleep 1 echo $Infaftplogin sleep 1 echo $Infaftppasswd sleep 1 echo $cmd1 sleep 5 echo $var1 sleep 5 echo exit (11 Replies)
Discussion started by: sam99
11 Replies

8. Solaris

connect whit Telnet without password

It's possible to connect whit Telnet (or rlogin) whithout password??? I must write a script (this script run on a windows machine), then after the connection on Unix machine, run a perl script and exit. I can know if an host can be consedered "Trusted" like SSH protocol? Thanks! (2 Replies)
Discussion started by: raffyTxT
2 Replies

9. UNIX for Dummies Questions & Answers

In Telnet I can't type anything in password!

I Need Help with Telnet when I login to telnet I type in my Unix user name and then I push ENTER and I can't type anything in password. CAN ANY ONE HELP ME??? (1 Reply)
Discussion started by: Campkin@Hunt
1 Replies
Login or Register to Ask a Question