Computing.Net > Forums > Unix > SSH and remote execution

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

SSH and remote execution

Reply to Message Icon

Name: Bill Hubbard
Date: February 21, 2003 at 13:11:52 Pacific
OS: hp11.0
CPU/Ram: 8 p900/8gb
Comment:

I am new to SecureShell but I'm learning...I need to know how to execute a script on a remote machine from a local machine where the script lives...For example, my script is called "vg_report.sh" and it lives on server "local"...I want to run the "vg_report.sh" script on machine "remote"...

From the documentation that I can find it appears that all I'd have to do is from the "local" machine type:

ssh remote vg_report.sh

but when I turn on verbose logging I can see that it successfully makes the connection to "remote", but it can't find "vg_report.sh" so that tells me that it's looking for the file on the remote machine...

Any ideas or suggestions would be greatly appreciated!!

Thanks!!

Bill Hubbard



Sponsored Link
Ads by Google

Response Number 1
Name: Jimbo
Date: February 22, 2003 at 06:23:08 Pacific
Reply:

The file must also reside on the remote machine. you can use 'scp' to copy the file to the remote server and then 'ssh' to execute it.

-jim


0

Response Number 2
Name: jaha
Date: February 25, 2003 at 05:02:27 Pacific
Reply:

Ich haven't try it, but i think it should work ;-)

cat vg_report.sh | ssh "remote /bin/sh -"


0

Response Number 3
Name: Bill Hubbard
Date: February 27, 2003 at 08:50:14 Pacific
Reply:

Thanks for the replies...Your suggestion worked great Jaha...Now I have another question:

When I scp or ssh to a remote server, is there anyway to suppress the .profile information?? I just want to ssh to a remote machine and only see the unix prompt at the remote location and nothing else...

Thanks!!

Bill Hubbard


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


operator not working in i... Find and Change String in...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: SSH and remote execution

UNIX on PC (Win XP) with SSH and Exceed www.computing.net/answers/unix/unix-on-pc-win-xp-with-ssh-and-exceed/3324.html

java running unix cmds remotely www.computing.net/answers/unix/java-running-unix-cmds-remotely/6328.html

Status of a remote file using SCP? www.computing.net/answers/unix/status-of-a-remote-file-using-scp/7390.html