LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Perplexing problem (https://www.linuxquestions.org/questions/linux-software-2/perplexing-problem-745041/)

mohitanchlia 08-04-2009 10:12 AM

Perplexing problem
 
I am trying to execute a command using ssh to the remote host.

$ ssh host2625.phar.com ant

bash: ant: command not found

(but then when do)

$ ssh host2625.phar.com

(and then hit "ant" (below) it finds the command. So it means it's in the path but for some reason it's not working)

[priv_user@host2625 ~]$ ant
Buildfile: build.xml does not exist!
Build failed


I have looked in .bash_profile and the path is set and I don't understand why I can't execute that command using ssh but when I login using ssh and then execute the command it works.

MensaWater 08-04-2009 10:55 AM

The ssh command is not executing your environment files - it is giving you a small environment similar to what cron does. You'd need to give the full path for ant in your ssh command line.


All times are GMT -5. The time now is 07:46 AM.