Sponsored Content
Full Discussion: RSH Timeout
Operating Systems Linux RSH Timeout Post 302356777 by pludi on Sunday 27th of September 2009 02:59:00 PM
Old 09-27-2009
rsh itself apparently doesn't support a timeout. If you've got netcat available, you could use this
Code:
netcat -z -w 3 remote 514

and check $?.
Or use IO::Socket::INET to open a connection yourself with a timeout and check that.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Timeout Error

I'm getting a error on a old SPARC Station 5 system. The HDD I am using in internal 18GB. Everything use to work, and well wont now. The error I am getting is in bootup. The error is 'Timeout waiting for ARP?RARP packet error'. Anyone got any idea how I can fix this? I'm not sure... (4 Replies)
Discussion started by: merlin
4 Replies

2. UNIX for Dummies Questions & Answers

sendmail timeout

Just implemented sendmail on rh9. The clients are timing out or dropping a connection to the server. What's up? I've been tweaking, but no noticable change. They can recieve and send mail, but it errors out consistently and then reconnects fine. Am I missing a timeout setting in the cf file? ... (1 Reply)
Discussion started by: benzo
1 Replies

3. HP-UX

timeout

How can I kick a user out after being idle for a certain amount of time, would prefer not to use scripts, will TMOUT work on HP-UX? (5 Replies)
Discussion started by: csaunders
5 Replies

4. Solaris

About the Timeout

Hello everyone I am a new one,I want to know how to get the solaris force the loginer out if he do not in a time thanks (4 Replies)
Discussion started by: lyh003473
4 Replies

5. Filesystems, Disks and Memory

timeout problem

Hi can anyone help with the following:- when sending large e-mails via a ssh session the job always times out every 5 min before the mail is sent, this means that a user has to tap a key to stop it timming out. Is there a way to stop this from happening. Numpty (4 Replies)
Discussion started by: numpty
4 Replies

6. Shell Programming and Scripting

Can we timeout cd command

Hi All, I want to know whether we can timeout the cd command in unix. If we can how is it implemented? Suppose cd command hangs can we timeout the command. Please help (9 Replies)
Discussion started by: dipashre
9 Replies

7. Shell Programming and Scripting

how to set timeout?

When I run a script where the 1st parameter is ip address ftp -n -i -v $1 I hang here if the ip is wrong how to set a timeout something like if (20s not complete "ftp -n -i -v $1") then echo "error" fi Thanks a lot. (14 Replies)
Discussion started by: uativan
14 Replies

8. UNIX for Dummies Questions & Answers

rsh and timeout

hi, i have many ksh shell scripts running "rsh" command and sometimes the remote host doesn't answer so the rsh command doesn't return data and the script waits. How can i modify this to have a forced return to continue my script , a kind of controlled timeout ? thanks in advance... (0 Replies)
Discussion started by: Nicol
0 Replies

9. Shell Programming and Scripting

EXCEPT timeout problem

i am trying to write an except script to ssh into a list of devices and run some commands, and i came across this problem, not every device is alive, which breaks the script, my script looks like this #!/usr/bin/expect # set defaults set... (1 Reply)
Discussion started by: fedora
1 Replies

10. Shell Programming and Scripting

Timeout in shellscripting

#!/bin/sh for ip in $(cat /root/Desktop/ftp.txt) do HOST=$ip USER='bob' PASS='bob' ftp -n $HOST <<EOF user bob bob EOF echo "$ip" done the Above code i want to use check and verify login works on multiple ftp servers on my network. However the ftp servers are dynamic in setup... (5 Replies)
Discussion started by: Noledge
5 Replies
RSH(1)							      General Commands Manual							    RSH(1)

NAME
rsh - remote shell SYNOPSIS
rsh [-n] [-l username] host [command] host [-n] [-l username] [command] DESCRIPTION
Rsh connects to the specified host, and executes the specified command. Rsh copies its standard input to the remote command, the standard output of the remote command to its standard output, and the standard error of the remote command to its standard error. Interrupt, quit and terminate signals are propagated to the remote command; rsh normally terminates when the remote command does. The remote username used is the same as your local username, unless you specify a different remote name with the -l option. This remote name must be equivalent (in the sense of rlogin(1)) to the originating account; no provision is made for specifying a password with a com- mand. If you omit command, then instead of executing a single command, you will be logged in on the remote host using rlogin(1). Shell metacharacters which are not quoted are interpreted on local machine, while quoted metacharacters are interpreted on the remote machine. Thus the command rsh otherhost cat remotefile >> localfile appends the remote file remotefile to the localfile localfile, while rsh otherhost cat remotefile ">>" otherremotefile appends remotefile to otherremotefile. OPTIONS
-l username Specify the remote user name. -n Connect standard input of the remote command to /dev/null. Do this if rsh should not inadvertently read from standard input. SEE ALSO
rcp(1), rlogin(1), rhosts(5). BUGS
You cannot run an interactive command (like rogue(6) or vi(1)); use rlogin(1). 4.2 Berkeley Distribution April 29, 1985 RSH(1)
All times are GMT -4. The time now is 07:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy