12-15-2005
execute command on reomte server
Hi all,
I have to execute one script on remote server. As far as i know we can do FTP to login on to remote server and list down the files. Is there any option to execute any shell secript on the remote server using this or any other remote login.
We have rlogin command also but i am not sure how to pass the user id and password information to this command and execute other script on it. (which on the server different from the server on which i have logged on) .
making it more easier to understand. I have a script on server A. though which i have to execute another script located on server B . Is it possible ?
any help would be highly appreciated.
Thanks
Manish
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi Group ,
I m trying to execute commands on some other system using write command but inspite of executing the commands they r passed as simple messages.
- i m writing
>write user-id
! ls
o
ctrl-d
inspite of executing the command ls,other terminal shows ! ls.
Thnx in advance. (2 Replies)
Discussion started by: Aashish
2 Replies
2. UNIX for Advanced & Expert Users
I need to execute a script from dev server which is located on Test server.I can use ftp to connect to dev server and from there how can i execute a command on test server.
Thanks (5 Replies)
Discussion started by: ukatru
5 Replies
3. UNIX for Dummies Questions & Answers
ssh -q <hostname> /opt/tcs/satish/tst.ksh
ssh -q <anotherserver> /opt/tcs/satish/tst.ksh
tst.ksh has "nohup <command> & "
when i execute below script , its throwing error as
nohup can not be found
ssh -q <anotherserver> /opt/tcs/satish/tst.ksh > log &
can someone let me... (5 Replies)
Discussion started by: only4satish
5 Replies
4. Shell Programming and Scripting
Hi,
i want to run the command in remote server through ssh and every time when i run the script its asking to enter the password. I dnt want to enter the password, when i enter the ip address and directly the command shuld execute.
Script:
#!/bin/bash
echo "Enter Server IP Address:"
read... (2 Replies)
Discussion started by: bapu1981
2 Replies
5. Shell Programming and Scripting
I am running the export command within a view to use that value inside my build script. But while executing it it is saying "export command not found"
My code is as follows:
--------------------------
#!/bin/sh
user="test"
DIR="/bldtmp/"$user
VIEW="test.view1"
echo "TMPDIR before export... (4 Replies)
Discussion started by: dchoudhury
4 Replies
6. Shell Programming and Scripting
Hi ,
Is there any script to copy a files (weblogic bianary + silent.xml ) from one server (linux) to another servers and then execute the copy file.
We want to copy a file on multiple servers and run the installation.
Thanks (1 Reply)
Discussion started by: Nawrajesh
1 Replies
7. Shell Programming and Scripting
Hi ,
I got a shell in one physical server and want to execute it in different servers. I did tried using ssh but iam not successful. Can someone through somelight on the subject and with some working examples ?
Also iam trying PHP in the front end to execute the shell and show the logs in... (6 Replies)
Discussion started by: cskumar
6 Replies
8. Shell Programming and Scripting
Hi
The command below does not work as it require to take command in the breakers
But If I do so the variable values get lost
ssh testserver01 'dsmc q b "${ARCHIVE_DIR}*" -sub=yes -querysummary -inactive -fromd="${BACKUP_DATE}"'
Thank you. (3 Replies)
Discussion started by: zam
3 Replies
9. Shell Programming and Scripting
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
10. Shell Programming and Scripting
Hello i am having an issue with bash script and this is the code
now=$(cat hosts1.txt | awk '{print $2;}')
while read n ;do
ssh root@$now 'useradd test1; echo -e "test1\ntest1" | passwd test1 && echo "test1 ALL=(ALL:ALL) ALL" >> /etc/sudoers'
When i execute only part with cat, it... (8 Replies)
Discussion started by: tomislav91
8 Replies
netrc(4) Kernel Interfaces Manual netrc(4)
NAME
netrc, .netrc - Specifies automatic login information for ftp
SYNOPSIS
$HOME/.netrc
DESCRIPTION
The .netrc file contains the information used by the automatic login (autologin) feature of the ftp command. It is a hidden file in your
home directory and must be owned by the user logging in, or by the root user. If the .netrc file contains a login password, the file's
permissions must be set to 600 (read and write by owner only).
The .netrc file can contain the following entries (separated by spaces, tabs, or newlines): Where host is the name of a remote host. This
entry begins the definition of the autologin process for the specified host. All following entries up to the next machine entry or the end
of the file apply to that host. This is the same as machine, except that default matches any name. There can be only one default token,
and it must appear after all machine tokens. This is normally used as follows: default login anonymous password user@site The preceding
command line gives the user automatic anonymous ftp login to machines not specified in .netrc. This can be overriden by using the -n flag
to disable autologin. Where user is the username to use at the remote host. If this entry is found, the autologin process initiates a
login using the specified name. If this entry is missing, the autologin process fails. Where password is the login password to be used.
The autologin process supplies this password to the remote server. A login password must be established at the remote host and that pass-
word must be entered in this file, or the autologin process fails and you are prompted for the login password. Where password is the
account password to be used. If this entry is found and an account password is required at the remote host, the autologin process supplies
the password to the remote server. If the remote host requires an account password but this entry is missing, the autologin process
prompts for the account password. Where macro is the name of an ftp subcommand macro. The macro definition starts on the following line
and is defined to contain all of the following ftp subcommands up to the next blank line. If the macro is named init, ftp executes the
macro upon successful completion of the autologin process.
FILES
Contains automatic login information.
RELATED INFORMATION
Commands: ftp(1). delim off
netrc(4)