LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-04-2009, 10:12 AM   #1
mohitanchlia
Member
 
Registered: Aug 2008
Posts: 60

Rep: Reputation: 15
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.
 
Old 08-04-2009, 10:55 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Perplexing question (just for fun) Phyrexicaid General 11 11-13-2005 01:35 PM
Perplexing Problem eqisow Linux - General 7 08-17-2005 12:02 PM
eth0 will not restart--very perplexing soren625 Linux - Networking 2 06-03-2004 03:51 AM
Perplexing wireless routing problem Gerr Linux - Wireless Networking 8 03-30-2004 08:55 AM
Perplexing routing question... WeNdeL Linux - Networking 5 10-01-2003 09:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration