telnet to remote server


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers telnet to remote server
# 1  
Old 11-05-2006
telnet to remote server

Hi every1
well i am new to unix scripting but i have been seeking help from this forum
the question

i want to write a script to telnet to a remote server
and put the username and pwd in the script
the problem is that i want to run some commands on the remote server and get the results in a file on the host
well when i am trying to telnet the script comes to the input mode asking me for the username and pwd and then i have to do the whole process manually.
I wud highly appriciate if some1 helps me out on this!!!!!!!!!

Thx & Regards
Hassan
# 2  
Old 11-05-2006
Instead of telnet you should rsh or even better ssh.
With rsh you need to setup your .rhosts file in the home directory of the user you are loging in with. The .rhosts file contains the user id and host you are connecting from. This way you will not be promptrd for a password.

But as I said earlier you should use ssh instead.
Tornado
# 3  
Old 11-06-2006
Thx for the prompt reply
but as i said i am a novice at this i knw of the .rhosts file but my other machine is not listed i knw i can edit it easily but my vendor is not so keen on doing that
Can u specify more what is the ssh method???
I wud highly appreciate it'
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script connect to remote server, not find files and exit only from remote server, but not from scrip

I have a script, which connecting to remote server and first checks, if the files are there by timestamp. If not I want the script exit without error. Below is a code TARFILE=${NAME}.tar TARGZFILE=${NAME}.tar.gz ssh ${DESTSERVNAME} 'cd /export/home/iciprod/download/let/monthly;... (3 Replies)
Discussion started by: digioleg54
3 Replies

2. Shell Programming and Scripting

Sudo connect to a remote server and execute scripts in remote server

Hello Every one!! I am trying to write a shell script which will connect to a remote server and execute scripts which are at a certain path in the remote server. Before this I am using a sudo command to change the user. The place where I am stuck is, I am able to connect to the... (6 Replies)
Discussion started by: masubram
6 Replies

3. BSD

Ping remote sever, nc, telnet, whatever

I put this thread to shell and bsd, because I want to resolve this matter on bsd. May somebody can explain to me how to ping a remote server, in unix. BTW the following code examples were tried on a linux system as well, with the same output, nothing. But on my bsd are not installed nmap neither... (4 Replies)
Discussion started by: 1in10
4 Replies

4. Solaris

Logging remote telnet sessions via script

Hi, My requirement - for security purpose - I want all root logins to my solaris servers are done by a script kept in a separate unix box. This script will telnet into remote solaris server with root user and log every session via log file. Now my purpose is to log every telnet session... (3 Replies)
Discussion started by: rahul_jain250
3 Replies

5. Programming

SFTP from one remote server to another remote server from desktop

Hi, I have 1. lappy 2. server A 3. server B Now, what i need is to run a command from lappy that will sftp a file from server A to server B. Please guide me to achieve this. -akash (1 Reply)
Discussion started by: akash.mahakode
1 Replies

6. Shell Programming and Scripting

Execute scripts from remote using telnet

Hi having the below code (sleep 1 echo "username" sleep 2 echo "password" sleep 2 echo "cd /home/test1/path" sleep 10 echo "ls -l | grep filename" if exists echo "script1.sh filename" echo "mailx -s "Task Executed" user@domain.com" else echo "mailx -s "File not Exist"... (1 Reply)
Discussion started by: karthikn7974
1 Replies

7. SCO

Remote connection trought Telnet

Well... finally I took and old SCO Server and it works fine to keep working my ERP, but now I have a "LITTLE" trouble... with the other server we've made a connection trought TinyTerm with a DYNDNS Domain, in my firewall I noticed that there's a RULE establishing that the IP 192.168.0.1 (Server IP... (4 Replies)
Discussion started by: LIA_RAG
4 Replies

8. Shell Programming and Scripting

remote monitoring of device by telnet

There is programm of monitoring by telnet. The main body of script is mkfifo pipe0 telnet $host $port < pipe0 > file0 & then after analizing of file0 printf "commands\r" > pipe0 This programm worked till then I kill pipe0 during working of programm. Now this script dont... (1 Reply)
Discussion started by: ILA
1 Replies

9. SCO

Openserver 5.0.4 can't be ping or telnet into from a remote site

Hi, Can anybody help me out why l can't not ping my server with Openserver 5.0.4 with my windows machine from a remote site. The machine could see the local LAN with the Router however, i can't ping or telnet unto the server from another site on the WAN. The default gateway was configure on the... (0 Replies)
Discussion started by: kayode
0 Replies

10. UNIX for Dummies Questions & Answers

telnet in for remote admin but not getting it

I have been using rsh, and vnc to access my computer from outside my network. I can do all the simple browsing's but when i go to start or stop apache httpd, or some other deamon commands I am running into problems. I log in as a standered user and the use % su to switch over to root. However,... (4 Replies)
Discussion started by: macdonto
4 Replies
Login or Register to Ask a Question