Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Secure-Shell
[Top] [All Lists]

remote execution problem with ssh

Subject: remote execution problem with ssh
Date: Tue, 1 Mar 2005 18:33:45 -0800 (PST)
Hello,

I have a peculiar problem i'm trying to track down.  The issue is remote
execution using ssh.  Passwordless logins are already setup and working
fine, the issue is with a command like the following:

/usr/bin/ssh -x DESTINATION_HOST -n COMMAND

will give the error COMMAND not found.  However, excluding the -n, the
above will run fine.  So it seemed that for some reason, the users
.profile was not being sourced and so the PATH, etc variables were not
being setup correctly hence why it couldn't find COMMAND.  So i created
the file /etc/ssh/sshrc that simply calls the users .profile file, but
this didn't change anything either.  However, if i do something stupid,
like,

/usr/bin/ssh -x DESTINATION_HOST -n echo $PATH

then i can see that the path is indeed there.  So it seems that straight
command execution when placed in the background with -n doesn't load up
all the users shell particulars, but otherwise things work the way they
should.

The documentation seems a little sparse in this regard (at least to me).
Can anyone offer some help?  Is this a PAM issue?

Thanks!

Matt

<Prev in Thread] Current Thread [Next in Thread>