Sponsored Content
Top Forums Shell Programming and Scripting Run a shell script from one host which connext to remote host and run the commands Post 302306523 by SN2009 on Monday 13th of April 2009 04:39:24 AM
Old 04-13-2009
Yeah it worked Smilie. Thanks a lot
 

10 More Discussions You Might Find Interesting

1. Solaris

How to delete the files from local host to remote host

Hi all, i am copying .gz files from production server to development server using "scp" command.my requirement is after copying .gz files i want to delete old .gz files(two days back) in development server from production server. like this way i need to delelte .log ,.z and .dmp files... (3 Replies)
Discussion started by: krishna176
3 Replies

2. Shell Programming and Scripting

running commands to remote host from centralized host

Gurus/Experts We have a centralized UNIX/Solaris server from where we can actually ssh to all other UNIX/Solaris servers...I need to write a script that reside on this centerlized server and do FileSystem monitoring (basically run df -h or -k) of other remote servers and then send an email to me... (6 Replies)
Discussion started by: anjum.suri
6 Replies

3. UNIX for Advanced & Expert Users

Help! How to find the local host after few ssh hops to remote host???

I do a ssh to remote host(A1) from local host(L1). I then ssh to another remote(A2) from A1. When I do a who -m from A2, I see the "connected from" as "A1". => who -m userid pts/2 2010-03-27 08:47 (A1) I want to identify who is the local host who initiated the connection to... (3 Replies)
Discussion started by: gomes1333
3 Replies

4. UNIX for Dummies Questions & Answers

Run a script on remote host

Hi, I wish to run a script located on a remote host machineB from machineA. I am using ssh and running the below on machineA. However, the ssh does not seem to work and freezes at ssh -l wlsadmin machineB -v Sun_SSH_1.1.2, SSH protocols 1.5/2.0, OpenSSL 0x0090704f debug1: Reading... (9 Replies)
Discussion started by: shifahim
9 Replies

5. Shell Programming and Scripting

HTML Code to Run a Script from Remote Unix Host

Hi All, Noticed few posts around this but coudnt get exatcly what i wanted. Thanks for your help again. I have a script running on a remote machine and i normally ssh from putty and run the script manually. Is there anyway that i can write an HTML Code with a button so taht when I Click... (1 Reply)
Discussion started by: robinbannis
1 Replies

6. Shell Programming and Scripting

How to run a shell script on a remote host using ftp

Hi, is there a way I can run a shell script through ftp on a remote host? The remote host doesn't have ssh running so I can't use ssh. (7 Replies)
Discussion started by: mrskittles99
7 Replies

7. Shell Programming and Scripting

Pause processes in remote host and resume execution in another remote host

Hi, Given addresses of 2 remote machines, using a shell script is it possible to get the state of running processes in "src" stop all the processes in "src" exit out of "src" ssh into "dest" resume the state of executing processes captured in step 1 in "dest" Assumption: "src" is... (3 Replies)
Discussion started by: Saeya Darsan
3 Replies

8. Shell Programming and Scripting

Run script on remote host

Hi friends, I have two servers. Server A and B. I want to run one script on server A by logging in to server B. Can anyone provide me code for this.? I tried it by using following ssh username@serverA ./script Then it prompt me the password. I give correct password of the server A. but it... (7 Replies)
Discussion started by: Nakul_sh
7 Replies

9. Shell Programming and Scripting

Run awk command on remote host

I have below command to check for error logs from last 24 hours from the file : /var/log/messages/ The command is working fine on the local host. sudo awk -F - -vDT="$(date --date="24 hours ago" "+%b %_d %H:%M:%S")" ' DT < $1' /var/log/messages | egrep -i "error|fail" I want to run the... (8 Replies)
Discussion started by: rahul2662
8 Replies

10. UNIX for Beginners Questions & Answers

Iso - remaster script trying to start chroot run commands then exit but host system gets messed up

The script works and creates a modified iso fine until I added the chrootbeg and chrootend functions and executed them. I'm sorry if I did something wrong this is my first post. I uploaded entire bash script for reference or in case you want to run it to debug it is called isoremast.txt. ... (5 Replies)
Discussion started by: paulhoffusa
5 Replies
dtsdate(1m)															       dtsdate(1m)

NAME
dtsdate - Sets local clock from a remote dtsd server host SYNOPSIS
dtsdate [-q] [-s] [-u] remote_host [nsecs] ARGUMENTS
Queries the difference in time between the local host and the remote host, but does not change the local clock. The returned result (2 if the time would have been reset, 1 if there was an error, and 0 otherwise) can be used by a script to determine what action to take. Causes dtsdate to work silently, without showing the time. Shows the time in UTC, rather than in the current time zone. The name or the IP address of a remote host that has a dtsd server. An integer giving the number of seconds by which the remote and local host times can dif- fer, without the local host's clock being reset. If nsecs is 0, or if it is not specified, it is treated as if it were extremely large, and no resetting occurs. DESCRIPTION
The dtsdate command sets the local clock of a system to be the same as the host remote_host, running a dtsd server. The purpose of dtsdate is to ensure that clock skew is minimized at initial cell configuration or at host instantiation, because it is difficult to start DCE and its components if the skew is too great. Clocks among all DCE components must be within five minutes of each other, to prevent failure of CDS and of security. Some DCE components have even more stringent requirements. For instance, a DFS file server cannot start if its local host differs from other DFS hosts by more than ten seconds. The dtsdate command can be used for adjusting a clock backwards, before DCE is running on a host. Adjusting a clock backwards while DCE is running can cause many difficulties, because security and file system software generally require system time to increase monotonically. NOTES
The remote host must be running as a DTS server. This means that the dtsd on that system must have registered the DTS management inter- face, because dtsdate uses the management call to get the current time from that host. For dtsdate to be able to set the clock, it must run as a privileged user (root). EXIT VALUE
If the -q argument is given, dtsdate returns 2 if the remote time and local time differ by more than nsecs, 1 if there was an error, and 0 otherwise. If the -q argument is not given, dtsdate returns 1 if there was an error, and 0 otherwise. EXAMPLES
With only the host argument: dtsdate remotehost dtsdate prints out the time on the remote host. In this example: dtsdate -s -q remotehost 10 dtsdate does not print out the remote host's time. If the times differ by more than 10 seconds, it returns the value of 1, otherwise 0. In the next example: dtsdate -s remotehost 10 dtsdate sets the clock if it differed from the remote clock by more than 10 seconds. It does this work silently, because of the -s option. The following example shows a shell script that uses the return value of dtsdate: dtsdate -s -q remhost 10 result = $? if [ $result -eq 0 ] ; then echo "Time is within tolerence." elif [ $result -eq 1 ] ; then echo "Could not contact remote host." >&2 else # result = 2 if dtsdate remhost 10; then # it failed! echo "Could not set the clock." >&2 fi fi RELATED INFORMATION
Commands: dtsd(1m) dtsdate(1m)
All times are GMT -4. The time now is 06:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy