![]() |
|
|
Welcome to the { mindfrost82.com } forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
executing ssh from shell script
Hi,
I am trying to execute a shell script on a remote machine using a shell script on the local machine. I am not getting any errors but the remote script is not getting executed. Can you please tell me where I am going wrong. The local shell script is as follows. #!/bin/sh ssh root@10.10.1.180 ~/testscripts/copyexecutable exit The copyexecutable script works fine if I ssh into the remote machine and execute it from the command prompt. TIA, R C |
|
|||
|
Re: executing ssh from shell script
R C V wrote:
> Hi, > I am trying to execute a shell script on a remote machine > using a shell script on the local machine. I am not getting any > errors but the remote script is not getting executed. > > Can you please tell me where I am going wrong. > The local shell script is as follows. > > #!/bin/sh > ssh root@10.10.1.180 ~/testscripts/copyexecutable The tilda will be expanded by your local shell; try quoting it. Robert > exit > > The copyexecutable script works fine if I ssh into the remote machine > and execute it from the command prompt. > > TIA, > R C |
|
|||
|
Re: executing ssh from shell script
On Wed, 19 Mar 2008 08:38:17 +0000, Robert Harris wrote:
> R C V wrote: > >> I am trying to execute a shell script on a remote machine >> using a shell script on the local machine. I am not getting any errors >> but the remote script is not getting executed. >> >> Can you please tell me where I am going wrong. The local shell script >> is as follows. >> >> #!/bin/sh >> ssh root@10.10.1.180 ~/testscripts/copyexecutable > > The tilda will be expanded by your local shell; try quoting it. If no absolute path is given the default directory in the ssh session will be the remote user's home directory. Try ssh root@10.10.1.180 "testscripts/copyexecutable" I always quote remote commands out of habit although they shouldn't be required unless there are spaces. |
![]() |
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|