Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to view bash history executed by PC1 on PC2 by way of Ant sshexec
    primarykey
    data
    text
    <p>there are currently 2 PCs, PC1 and PC2. I have an Ant script on PC1, the script will execute bash commands on PC2 using sshexec task, the snippet may like the following:</p> <pre><code>&lt;sshexec host="${IPofPC2}" username="${USERofPC2}" password="${PASSofPC2}" command='echo "Hello World!"' trust="true"&gt;&lt;/sshexec&gt; </code></pre> <p>in practice the command is a complex one, I give <code>echo "Hello World!"</code> for an example.</p> <p>I want to see what exactly the command is that have executed on PC2, but I don't know how to. I googled and find <code>.bash_history</code> will save the remotely executed commands by one login using ssh-like terminal.</p> <p>It seems this may help, but tried with no success, the <code>.bash_history</code> file won't record commands executed by sshexec task remotely.</p> <p>So SOS, please help. Thanks in advance.</p> <p><strong>Edit:</strong></p> <pre><code>#/etc/syslog.conf !sshd *.* /var/log/sshd.log </code></pre> <p><strong>Attachment:</strong></p> <p>$cat /var/log/sshd.log</p> <blockquote> <p>Dec 8 17:36:29 brownshen launchproxy[1373]: /usr/libexec/sshd-keygen-wrapper: Connection from: 10.224.105.186 on port: 4090 Dec 8 17:36:30 brownshen sshd[1376]: in pam_sm_authenticate(): Failed to determine Kerberos principal name. Dec 8 17:36:30 brownshen sshd[1374]: Accepted keyboard-interactive/pam for zhouvega from 10.224.105.186 port 4090 ssh2 Dec 8 17:36:30 brownshen com.apple.SecurityServer[23]: Session 0x3096eb created Dec 8 17:36:30 brownshen com.apple.SecurityServer[23]: Session 0x3096eb attributes 0x20 Dec 8 17:36:30 brownshen com.apple.SecurityServer[23]: Session 0x3096eb dead Dec 8 17:36:30 brownshen com.apple.SecurityServer[23]: Killing auth hosts Dec 8 17:36:30 brownshen com.apple.SecurityServer[23]: Session 0x3096eb destroyed</p> </blockquote>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload