Sponsored Content
Full Discussion: Run script on remote host
Top Forums Shell Programming and Scripting Run script on remote host Post 302879604 by Nakul_sh on Friday 13th of December 2013 10:28:43 AM
Old 12-13-2013
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
Code:
ssh username@serverA ./script

Then it prompt me the password. I give correct password of the server A. but it says access denied.

What are other commands to achieve this? Is it required to do some configuration changes on server A and B before doing this?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Run a shell script from one host which connext to remote host and run the commands

I want to write a script which would run from one host say A and connect to other remote host B and then run rest of commands in that host. I tried connecting from A host to B with SSH but after connecting to host B it just getting me inside Host B command prompt. Rest of the script is not running... (6 Replies)
Discussion started by: SN2009
6 Replies

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

3. Shell Programming and Scripting

Plz help me using expect script for remote host

I am newbie in Unix and Expect script, so please help me :( I'm using expect script for remote another host: #!/usr/bin/expect -f set timeout 10 spawn ssh -l root 10.120.18.4 expect "password:" send "password\r" expect "@" interact And now how can i use expect script for access mysql... (2 Replies)
Discussion started by: wormym
2 Replies

4. Shell Programming and Scripting

manage an interactive script on a remote host

OS~AIX 6.1 I'm running an interactive shell script i.e.,waits for a user response a few times while executing, after doing ssh to a AIX server. I'm just wondering what options I have if the ssh connection to the server is lost while executing the script, do I have to run the script again, which in... (2 Replies)
Discussion started by: mbak
2 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

Check/get the exit status of a remote command executed on remote host through script

Geeks, Could you please help me out in my script and identify the missing piece. I need to check/get the exit status of a remote command executed on remote host through script and send out an email when process/processes is/are not running on any/all server(s). Here's the complete... (5 Replies)
Discussion started by: lovesaikrishna
5 Replies

9. Shell Programming and Scripting

Last part of script to remote host not working...

Hi, I got most of the script working, last part which does the ssh to remote and execute the command not working. for SSH in ${HostList}; do echo ${SSH} echo "" SSH2SEND=ssh user@${SSH} curl -v $URL echo $SSH2SEND done error message I am getting ... (5 Replies)
Discussion started by: samnyc
5 Replies

10. 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
dtappsession(1) 						   User Commands						   dtappsession(1)

NAME
dtappsession - start a new Application Manager session SYNOPSIS
/usr/dt/bin/dtappsession [hostname] DESCRIPTION
dtappsession is a specialized version of the Xsession shell script. It is an alternative to using the CDE remote login that allows you to access a remote host without logging out of your current CDE session. dtappsession starts a new instance of the CDE Application Manager in its own ToolTalkTM session. It can be used to remotely display the Application Manager back to your local display after logging in to a remote host with the rlogin(1) command. A new, independent instance of ttsession(1) starts a simple session management window. This window displays the title remote_hostname: Remote Administration where remote_hostname is the system that is being accessed. The window also displays an Exit button. Clicking Exit terminates the ToolTalk session and all windows that are part of the session. The Application Manager that is displayed can be used to start remote CDE actions to run in this session. Exiting the Application Manager does not terminate the session, and it is not recommended. Clicking Exit is the recommended way to end the session. To avoid confusing the remote CDE applications with local ones, it is recommended that a new CDE workspace be created for clients in the remote session. The hostname is not needed when the DISPLAY environment variable is set to the local hostname on the remote host. On a system that is configured with Trusted Extensions, dtappsession can be used for remote administration by administrative roles that have the ability to log in to the remote host. dtappsession does not require any privilege, and it does not need to run on a system that is configured with Trusted Extensions. When installed in /usr/dt/bin on a Solaris system, along with the startApp.ds file, dtappsession can be used to administer the remote Solaris system from a local system that is configured with Trusted Extensions. However, in this case, the CDE workspace that is used for remote display must be a normal workspace, rather than a role workspace. EXAMPLES
Example 1 Remote Login and dtappsession After creating a new CDE workspace, type the following in a terminal window: # rlogin remote_hostname password: /*type the remote password*/ # dtappsession local_hostname /* on the remote host */ FILES
/usr/dt/bin/startApp.ds dt Korn shell script for session manager window ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWdttsu | +-----------------------------+-----------------------------+ |Interface Stability |Committed | +-----------------------------+-----------------------------+ BUGS
X11/CDE applications that do not register with the ToolTalk session manager will not exit automatically when the session is terminated. Such applications must be explicitly terminated. SEE ALSO
dtfile(1), rlogin(1), ttsession(1), attributes(5) Chapter 14, Remote Administration in Trusted Extensions (Tasks), in Solaris Trusted Extensions Administrator's Procedures NOTES
The functionality described on this manual page is available only if the system is configured with Trusted Extensions. SunOS 5.11 15 Aug 2005 dtappsession(1)
All times are GMT -4. The time now is 01:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy