Sponsored Content
Top Forums Shell Programming and Scripting how to supply arguments for a script while ssh to a server Post 302568953 by rbalaj16 on Friday 28th of October 2011 08:57:41 PM
Old 10-28-2011
Question how to supply arguments for a script while ssh to a server

Hi,
I have something like below code piece in ksh

Code:
while read machine
do
  ssh $user@$machine < steps.ksh $RPI
done < $machine

here, after it gets logged in to server it is not considering the $PRI as argument for steps.ksh script

please suggest the fix.

Last edited by Franklin52; 10-29-2011 at 11:59 AM.. Reason: Please use code tags for data and code samples, thank you
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to ssh to different server and get some info

Hi Friends, i am trying to write a script on server MACHINE1 to ssh to server MACHINE2 and fetch some information. i am using the following command: ChanCount=`ssh MACHINE2 "disp card all | grep Inserv | grep -v STATE | wc -l"` The "disp" command works well on MACHINE2 but not working... (2 Replies)
Discussion started by: am_yadav
2 Replies

2. AIX

Supply Password Thru Script

Hello, I am using AIX 5 and one of the application does certain db updation daily and runs few script. One script among them calls another program, which in turn asks for a user Id and password. Is there anyway to use 'expect' of something similar on AIX so that while calling that program of... (1 Reply)
Discussion started by: panchpan
1 Replies

3. Solaris

NFS write failed for server.....error 11 (RPC: Server can't decode arguments)

Hello! I have a Linux nfs server (called server100 below) with a export nfs. My problem is that the Solaris client (called client100 below) doesn't seems to like it. In the Solaris syslog I got following messages (and after a while the solaris client behave liked its hanged/to buzy). Also see... (3 Replies)
Discussion started by: sap4ever
3 Replies

4. Shell Programming and Scripting

Automated script to SSH to another server

Hi guys, I have a script which looks a little like this; grep $id /usr/local/production/service/distributor/clients/*/out/events.xml | awk -F/ '{print $8}' I want to be able to run this on my dev box, so need to add something into the script which will SSH onto the live server, collect the... (2 Replies)
Discussion started by: JayC89
2 Replies

5. Shell Programming and Scripting

SSH Arguments

I Have a script call flash which accepts a encrypted file as argument decrypts it and write output to new file. I have to call this script via ssh from my pc , i want to know how to pass this file residing on my pc as argument to this script. my usual way of calling the script is <./flash.sh ... (1 Reply)
Discussion started by: krounak
1 Replies

6. Programming

Not able to ssh to other server from CGI script

Hi All, I have designed a web tool in perl cgi in UNIX Solaris 10 platform. According to my cgi script (in server A) it should execute a script (in server B) using ssh key authentication, but it is not. And when I am trying to execute the command without cgi script, the script in server B... (4 Replies)
Discussion started by: ankit_talwar
4 Replies

7. Shell Programming and Scripting

Script to SSH into a server

Hi, Actually i'm trying to write a script which needs to ssh into a server and run a command on the server, after entering a valid login. But after ssh the script will no longer run on the SSHed server :( so is there any way to do so ??? (1 Reply)
Discussion started by: nagios
1 Replies

8. Shell Programming and Scripting

Connect (SSH) to Windows server via Linux server through a script and passing command.. but failing

I am trying to connect to Windows server via Linux server through a script and run two commands " cd and ls " But its giving me error saying " could not start the program" followed by the command name i specify e g : "cd" i am trying in this manner " ssh username@servername "cd... (5 Replies)
Discussion started by: sunil seelam
5 Replies

9. Shell Programming and Scripting

Script to ssh to remote server

Hi All, I need to prepare a script. Description: Currently i am in server "x(ubuntu os)", here i need to develop a script to ssh to another server "y(ubuntu os)", i have password less authentication to "y". i have done the below #!/bin/bash #ssh to the server "y" and confirming i am... (2 Replies)
Discussion started by: kumar85shiv
2 Replies

10. Shell Programming and Scripting

Supply passphrase for ssh in script

I would like to write a bash shell script which will connect to remote server using passphrase. (I have public-private infrastructure created, and as per instruction, I must not use password less ssh). This particular script will be fired from cron. Can you please advice how I can supply the... (2 Replies)
Discussion started by: atanubanerji
2 Replies
SSH-KEYSIGN(8)						    BSD System Manager's Manual 					    SSH-KEYSIGN(8)

NAME
ssh-keysign -- ssh helper program for hostbased authentication SYNOPSIS
ssh-keysign DESCRIPTION
ssh-keysign is used by ssh(1) to access the local host keys and generate the digital signature required during hostbased authentication with SSH protocol version 2. ssh-keysign is disabled by default and can only be enabled in the the global client configuration file /etc/ssh/ssh_config by setting HostbasedAuthentication to ``yes''. ssh-keysign is not intended to be invoked by the user, but from ssh(1). See ssh(1) and sshd(8) for more information about hostbased authen- tication. FILES
/etc/ssh/ssh_config Controls whether ssh-keysign is enabled. /etc/ssh/ssh_host_dsa_key, /etc/ssh/ssh_host_rsa_key These files contain the private parts of the host keys used to generate the digital signature. They should be owned by root, read- able only by root, and not accessible to others. Since they are readable only by root, ssh-keysign must be set-uid root if hostbased authentication is used. SEE ALSO
ssh(1), ssh-keygen(1), ssh_config(5), sshd(8) AUTHORS
Markus Friedl <markus@openbsd.org> HISTORY
ssh-keysign first appeared in OpenBSD 3.2. BSD
May 24, 2002 BSD
All times are GMT -4. The time now is 12:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy