SCP Issue

Brian K. White brian at aljex.com
Wed Apr 7 06:31:40 PDT 2010


On 4/6/2010 11:47 AM, Ed Hilovsky wrote:
> An HTML attachment was scrubbed...
> URL: http://mailman.celestial.com/pipermail/filepro-list/attachments/20100406/04c4b814/attachment.html

A few different things.

* When you execute remote commands via ssh your environment is different 
than it is when you log in and run the same commands manually, whether 
you used ssh or something else to log in.
When you log in you end up running /etc/profile and ~/.profile.
So if you want to execute things via direct remote execution via ssh, 
one way to ensure it works is: write the commands into a script file on 
the target machine, and define all necessary environment variables in 
that script to make the commands in it behave as necessary. This usually 
mostly means PATH, and in the case of filepro maybe several more 
variables like TERM and various PF* variables like PFMBTO PFDIR PFDATA. 
Then from the client machine use the full path to that script in the ssh 
command line, because the script won't be in the minimal PATH set up by 
ssh without login.

* Don't run commands that "do things" in .bashrc . bashrc is for 
environmental maintenance. It gets executed many times in many contexts. 
Things that you want to do once per login or once per connection should 
be done in .profile . Except it sounds like in this case you don't 
really want that even, you want to give the command on the ssh command 
line from the calling machine and have nothing special in .profile or 
.bashrc

* Your message didn't display properly because of the way the list 
software stripped and archived the html part, so I can't really tell 
what some of your post was asking because of all the    . 
So if you could post again in plain text you may get more and better help.

-- 
bkw


More information about the Filepro-list mailing list