Sponsored Content
Top Forums Shell Programming and Scripting Passing the variable value to remote server. Post 302360437 by nmadhuhb on Friday 9th of October 2009 01:26:43 AM
Old 10-09-2009
Cool ... Its worked


Thank u..
 

10 More Discussions You Might Find Interesting

1. 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

2. Shell Programming and Scripting

Passing Values to remote server

I'm trying to pass there values from the present server to the remote server. here is the below code. function abc() { export a=$1 export b=$2 export c="$3" export d="$4" #servers Servers=$(echo server40{1..3}p.s.com) for host in ${Servers}; do #server login ssh $host... (4 Replies)
Discussion started by: Amutha
4 Replies

3. Shell Programming and Scripting

Creating a variable in remote server

Can anyone help how to create a variable in remote server using shell script. i am connecting to remote server through ssh and creating a variable and assigning the value, but nothing is displayed when i run the script Here is my script ssh hostname <<EOF a=10 echo $a EOF (1 Reply)
Discussion started by: Rahul12341984
1 Replies

4. UNIX for Dummies Questions & Answers

Passing of variable values to remote server

Hi, My script will take 3 i/p's from user. Now i need to pass these 3 values to remote server. Please find my code. while do echo " To which server you want to connect ? " echo " 1. server1 \n" echo " 2. server2 \n" read opt_server if then echo "enter the... (2 Replies)
Discussion started by: sree143reddy
2 Replies

5. 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

6. Shell Programming and Scripting

How to store remote variable from remote cat file ??

I am trying to cat on a file located on remote server and assign it to remote variable. I have both local and remote variables. Running below script from local. test.sh J_NAME=XXX2 J_IP=XXX ssh $J_IP "ps auxw |grep java | grep -v grep |grep $J_NAME | awk '{print ... (2 Replies)
Discussion started by: oraclermanpt
2 Replies

7. UNIX for Advanced & Expert Users

Passing variable as input & storing output in other variable

I have a below syntax its working fine... var12=$(ps -ef | grep apache | awk '{print $2,$4}') Im getting expected output as below: printf "%b\n" "${VAR12}" dell 123 dell 456 dell 457 Now I wrote a while loop.. the output of VAR12 should be passed as input parameters to while loop and results... (5 Replies)
Discussion started by: sam@sam
5 Replies

8. 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

9. 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

10. Shell Programming and Scripting

Delete line from remote file over ssh passing variable

I have a variable called $a1 which maps to something like "http://servername proxy1 count http" and a lots of entries in a file on remote server. If I have the following in my .sh script: sed -i "\%$a1%d" mylog.txtthe line is deleted from mylog.txt. Great. I'm trying now to remvoe this from a... (3 Replies)
Discussion started by: say170
3 Replies
xon(1X) 																   xon(1X)

NAME
xon - start an X program on a remote machine SYNOPSIS
xon remote-host [-access] [-debug] [-name window-name] [-nols] [-screen screen-no] [-user user-name] [command...] OPTIONS
Note that the options follow the remote host name (as they do with rlogin). Runs xhost locally to add the remote host to the host access list in the X server. This will not work unless xhost is given permission to modify the access list. Normally, xon disconnects the remote process from stdin, stdout and stderr to eliminate the daemon processes which usually connect them across the network. Specifying the -debug option leaves them connected so that error messages from the remote execution are sent back to the originating host. This specifies a different application name and window title for the default command (xterm). Normally xon passes the -ls option to the remote xterm; this option suspends that behaviour. This changes the screen number of the DISPLAY variable passed to the remote command. By default, xon simply uses rsh/remsh/rcmd to connect to the remote machine using the same user name as on the local machine. This option cause xon to specify an alternative user name. This will not work unless you have authorization to access the remote account, by placing an appropriate entry in the remote users file. DESCRIPTION
The xon program runs the specified command (default xterm -ls) on the remote machine using rsh, remsh, or rcmd. xon passes the DISPLAY, XAUTHORITY and XUSERFILESEARCHPATH environment variables to the remote command. When no command is specified, xon runs 'xterm -ls'. It additionally specifies the application name to be 'xterm-remote-host' and the win- dow title to be 'remote-host'. xon can only work when the remote host will allow you to log in without a password, by having an entry in the file permitting access. BUGS
xon can get easily confused when the remote-host, user-name or various environment variable values contain white space. xon has no way to send the appropriate X authorization information to the remote host. xon(1X)
All times are GMT -4. The time now is 10:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy