05-26-2009
Quote:
Originally Posted by
sylvainkalache
about EOT
It's just another way to specify some text to send to the stdandard input.
It seems that ssh actively refuses any input from the standard input if not connected to an interactive terminal.
I'm afraid that perhaps the only way is to authenticate via a private key, and have a remote script start automatically on login.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello everybody,
I have a question about I/O redirection within a coprocess.
I want to setup a coprocess and then redirect output to a file on a remote machine.
Here's some Perderabo code modified
exec 4>&1
#
# Section 1 --- Prove that we can talk with the hosts in HOSTLIST
# ... (4 Replies)
Discussion started by: Mugin
4 Replies
2. Shell Programming and Scripting
I am wracking my brains over this. I am trying to use a Korn Shell script to execute an Oracle PL/SQL procedure, using the Oracle command line interface (sqlplus). The script starts sqlplus in a coprocess, and the two processes communicate using a two-way pipe. The bgnice option is off, so both... (8 Replies)
Discussion started by: Mark Puddephat
8 Replies
3. Shell Programming and Scripting
Hi all,
Just like to ask if it is possible to do the following:
1. Have a shell script that calls ssh username@destinationhost
2. Upon successful verification, we ssh into the destination host and automatically use ksh to run a shell script that resides in the destination host. (Hopefully no... (8 Replies)
Discussion started by: rockysfr
8 Replies
4. Shell Programming and Scripting
Hi can any one let me know if awk doesnt work with the coprocess??? I have tried a simple example mentioned below but couldnt get it working seems like awk doesnt work with the coprocess concept. I would appreciate very much for any inputs on this.
exec 4>&1
awk -v count=$COUNT >&4 2>&4 |&... (6 Replies)
Discussion started by: ahmedwaseem2000
6 Replies
5. Shell Programming and Scripting
Is there a way to shorten these commands? because this script asks for a password 3 times
scp -p /usr/local/bin/${script_name} ${servername$iy]}://usr/local/bin/
ssh ${servernames} /usr/local/bin/${script_name}
ssh ${servernames} rm -f /usr/local/bin/${script_name}
Basically, I'm creating a... (3 Replies)
Discussion started by: pdtak
3 Replies
6. Shell Programming and Scripting
This is probably a simple one for the wise.
I have just started using a coprocess (first time) in order to facilitate telnet'ing from inside a shell script. It's working, but when I run a remote command I need to get the output into a local variable, but alas my kung-fu is weak.
#!... (10 Replies)
Discussion started by: dan-e
10 Replies
7. Shell Programming and Scripting
While assisting a forum member, I recommended running SQL/Plus in a coprocess (to make database connections and run a test script) for the duration of his script rather than starting/stopping it once for every row in a file he was processing.
I recalled I made a coprocess example for folks at... (2 Replies)
Discussion started by: gary_w
2 Replies
8. Shell Programming and Scripting
Hi,
I am trying to figure out a ksh script that i have and i think i found it but not sure.
i am having to scp or sftp files from my remote server over 2 others to the destination.
i have the rsa keys setup for the servers on my end and the username and password for the final server.
... (3 Replies)
Discussion started by: ksh_beginner
3 Replies
9. Shell Programming and Scripting
Script name is test.ksh
I know that that the ssh command is working properly, this can be verified by the value returned in respond variable. It is unique to the remote server
_____________________________________________________
respond=$(ssh $remoteHost find... (3 Replies)
Discussion started by: Adagio
3 Replies
10. Shell Programming and Scripting
i have a script that should ssh to different host/server. See below:
./script.ksh var1 var2 var3
case $ser in
ser1)
depo='appr1'
set -A aprrA aprrB
ssh ser2 "/home/dir/script.ksh $1 $2 $3"
ssh ser3 "/home/dir/script.ksh $1 $2 $3"
ssh ser4... (4 Replies)
Discussion started by: erin00
4 Replies
RLOGIN(1) General Commands Manual RLOGIN(1)
NAME
rlogin - remote login
SYNOPSIS
rlogin [-8EL] [-e char] [-l username] rhost
rhost [-8EL] [-e char] [-l username]
DESCRIPTION
Rlogin connects your terminal on the current local host system lhost to the remote host system rhost.
Each host has a file /etc/hosts.equiv which contains a list of rhost's with which it shares account names. (The host names must be the
standard names as described in rsh(1).) When you rlogin as the same user on an equivalent host, you don't need to give a password. Each
user may also have a private equivalence list in a file .rhosts in his login directory. Each line in this file should contain an rhost and
a username separated by a space, giving additional cases where logins without passwords are to be permitted. If the originating user is
not equivalent to the remote user, then a login and password will be prompted for on the remote machine as in login(1). To avoid some
security problems, the .rhosts file must be owned by either the remote user or root.
The remote terminal type is the same as your local terminal type (as given in your environment TERM variable). The terminal or window size
is also copied to the remote system if the server supports the option, and changes in size are reflected as well. All echoing takes place
at the remote site, so that (except for delays) the rlogin is transparent. Flow control via ^S and ^Q and flushing of input and output on
interrupts are handled properly. The optional argument -8 allows an eight-bit input data path at all times; otherwise parity bits are
stripped except when the remote side's stop and start characters are other than ^S/^Q. The argument -L allows the rlogin session to be run
in litout mode. A line of the form ``~.'' disconnects from the remote host, where ``~'' is the escape character. Similarly, the line
``~^Z'' (where ^Z, control-Z, is the suspend character) will suspend the rlogin session. Substitution of the delayed-suspend character
(normally ^Y) for the suspend character suspends the send portion of the rlogin, but allows output from the remote system. A different
escape character may be specified by the -e option. There is no space separating this option flag and the argument character. With the -E
option the escape can be turned off.
SEE ALSO
rsh(1), rhosts(5).
BUGS
More of the environment should be propagated.
4.2 Berkeley Distribution May 12, 1986 RLOGIN(1)