problem with rsh in bash shell


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting problem with rsh in bash shell
# 1  
Old 08-26-2012
problem with rsh in bash shell

Hello All,

I am trying to gather output of df -k from remote server to local server using below line:
Code:
rsh <host>  df -k >/tmp/space_remote_host.txt

Why above throws following error messageSmilieI've deleted the IP address in below chunk)

Code:
connect to address ..: Connection refused
Trying krb4 rsh...
connect to address ....: Connection refused
trying normal rsh (/usr/bin/rsh)
exec: No such file or directory


Last edited by Scott; 08-26-2012 at 01:23 PM.. Reason: More code tags
# 2  
Old 08-26-2012
Does your normal interactive login work?
# 3  
Old 08-26-2012
On some systems, rsh is a "remote" shell; on other systems, rsh is a "restricted" shell. It looks like krb4 rsh is a remote shell and /usr/bin/rsh is a restricted shell on this system. Check the rsh(1) and sh(1) on your system to determine what the pathnames are to the remote shell(s) on your system.

The connection refused diagnostics from the remote shell means that the requested remote system decided that you (your user ID, or anyone on your system) will not be allowed to run applications on that remote system.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Problem running plsql using printf command on bash shell

I am running plsql using printf on a shell, but i am getting some strange error, can someone point what exactly am i missing, $ echo $SHELL /bin/bash $ printf " > SET serveroutput ON trimspool on feed off echo off > declare > p_val number; > d_val varchar2(10); > begin > SELECT... (1 Reply)
Discussion started by: kamauv234
1 Replies

2. Fedora

Bash shell problem on Fedora Linux

My shell environment is bash and desktop environment is LXDE. When I use the up and down button on the keyboard to view the command history on bash shell, many times part of the command from the history remains on the line. For example /home/milhan > ssh somedomain.org /home/milhan > then when I... (5 Replies)
Discussion started by: milhan
5 Replies

3. AIX

Help with rsh problem

Hi all, just after a bit of help.. I am attempting to read in the contents of a flat text file from one system to another using 'rsh', i have this setup over around 15 machines and it works for them all except one. On this one machine it just reads in a blank line for some reason. The machine... (21 Replies)
Discussion started by: forefather1977
21 Replies

4. Shell Programming and Scripting

Problem with bash shell script program

Hi, This is my program. #!/bin/bash today=`date +"%b-%d-%Y"` SERVICE="pbxconnect.php" if ; then echo "pbx program is running" else nohup php pbxconnect.php > logpbx-$today.txt & fi On executing using "sh myprogram.sh" , i get the following error. myprogram.sh: line 4: ' My... (7 Replies)
Discussion started by: gskumar1234
7 Replies

5. Shell Programming and Scripting

problem using arrow keys in bash shell

hello everybody, as many, I have a problem with a script... I wrote a shell script in which I want to read a variable value. the problem is that I can't use the arrow keys. Here is the script I use : #!/bin/bash stty erase ^H read foune echo "$foune" exit 0; the problem is... (2 Replies)
Discussion started by: Moumou
2 Replies

6. Shell Programming and Scripting

problem with while loop in BASH shell

I have file named script1 as follows: #!/bin/bash count="0" echo "hello" echo "$count" while do echo "$count" count=`expr $count + 1` done ----------- when I run it, I get ./script1: line 9: syntax error near unexpected token `done' ./script1: line 9: `done' I... (6 Replies)
Discussion started by: npatwardhan
6 Replies

7. UNIX for Advanced & Expert Users

Problem in running bash shell commands on HP-UX machine

Hello All, After login to the server we are explicitly calling /usr/local/bin/bash to activate bash shell properly. But since commands are not executing properly so I think it is not initialized well. I am facing following problems: 1) If I want to have a look on a particular file using tail... (6 Replies)
Discussion started by: abhishek0071
6 Replies

8. Shell Programming and Scripting

rsh problem

I tried to execute by rsh a script, but I did not succeed. You can execute only commnads (not scripts) by rsh or there are some other restrictions?!? root@a1 #pwd / root@a1 #rsh a2 monitor ksh: monitor: not found On the other hand: root@a1 #rsh a2 root@a2 #pwd / root@a2 #ls monitor... (9 Replies)
Discussion started by: heartwork
9 Replies

9. Shell Programming and Scripting

rsh problem

hey, I'v a problem when I use rsh. When it logs in, it goes my home directory. I want it to go directly to my working directory. An idea I had was to redirect pwd to a file (pwd > somefile) and then once I'v rsh'd, cd to that path. I don't know how to read from the file to use as a parameter for... (2 Replies)
Discussion started by: Bacchus
2 Replies

10. UNIX for Dummies Questions & Answers

problem with rsh

Hi all I have checked the archives and cannot find a solution. I get a permission denied error, however all the suggestions donot help. here is the scenario root@OPSBOX#/>rsh OPSBOX ls -l rshd: 0826-813 Permission is denied. root@OPSBOX#/>pg .rhosts OPSBOX root OPSBOX ... (1 Reply)
Discussion started by: jhansrod
1 Replies
Login or Register to Ask a Question