<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: track commands using ssh (with passphrase) in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/track-commands-using-ssh-with-passphrase/m-p/3589793#M18882</link>
    <description>You can make it with /etc/profile easily. Previously, I was suggesting solution for keep tracking ssh connection information. To me command history you have to set HISTFILE as,&lt;BR /&gt;&lt;BR /&gt; --/etc/profile&lt;BR /&gt; set -o vi&lt;BR /&gt; export HISTFILE=$HOME/.ssh_history&lt;BR /&gt; export HISTSIZE=1000&lt;BR /&gt;&lt;BR /&gt;It will setting history file. Anyway, If you want to set it only for SSH login then,&lt;BR /&gt;&lt;BR /&gt; -- /etc/profile --&lt;BR /&gt; ps | grep -q 'ssh'&lt;BR /&gt; if [[ $? -eq 0 ]]&lt;BR /&gt; then&lt;BR /&gt;  set -o vi&lt;BR /&gt;  export HISTFILE=$HOME/.ssh_history&lt;BR /&gt;  export HISTSIZE=1000&lt;BR /&gt; fi&lt;BR /&gt;&lt;BR /&gt;It will be logging ssh related history into $HOME/.ssh_history. &lt;BR /&gt;&lt;BR /&gt;Any terminal login (non cde) will use /etc/profile always.&lt;BR /&gt;&lt;BR /&gt;hth.&lt;BR /&gt;</description>
    <pubDate>Wed, 27 Jul 2005 03:10:05 GMT</pubDate>
    <dc:creator>Muthukumar_5</dc:creator>
    <dc:date>2005-07-27T03:10:05Z</dc:date>
    <item>
      <title>track commands using ssh (with passphrase)</title>
      <link>https://community.hpe.com/t5/operating-system-linux/track-commands-using-ssh-with-passphrase/m-p/3589789#M18878</link>
      <description>Hi, I would like to have a command history for ssh connections for authenticated hosts.&lt;BR /&gt;I noticed that by default, without passphrase, commands are logged in .bash_history file. Otherwise using passprhase, commands are not saved anywhere.&lt;BR /&gt;How could I manage?&lt;BR /&gt;&lt;BR /&gt;Thank You.&lt;BR /&gt;&lt;BR /&gt;Leonardo.</description>
      <pubDate>Tue, 26 Jul 2005 04:02:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/track-commands-using-ssh-with-passphrase/m-p/3589789#M18878</guid>
      <dc:creator>leonardo bianchi quota</dc:creator>
      <dc:date>2005-07-26T04:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: track commands using ssh (with passphrase)</title>
      <link>https://community.hpe.com/t5/operating-system-linux/track-commands-using-ssh-with-passphrase/m-p/3589790#M18879</link>
      <description>It will be located in /var/log/messages file. You can also get history login informations with last command.&lt;BR /&gt;&lt;BR /&gt;hth.</description>
      <pubDate>Tue, 26 Jul 2005 04:04:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/track-commands-using-ssh-with-passphrase/m-p/3589790#M18879</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-07-26T04:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: track commands using ssh (with passphrase)</title>
      <link>https://community.hpe.com/t5/operating-system-linux/track-commands-using-ssh-with-passphrase/m-p/3589791#M18880</link>
      <description>That's odd..  '.bash_history' is for all login sessions, regardless of how they came in.&lt;BR /&gt;&lt;BR /&gt;Something to verify on one of your passphrase sessions is to the content of the 'HISTFILE' environment variable:&lt;BR /&gt;&lt;BR /&gt;echo $HISTFILE&lt;BR /&gt;&lt;BR /&gt;It should point to '.bash_history' in the user's home directory.</description>
      <pubDate>Tue, 26 Jul 2005 04:11:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/track-commands-using-ssh-with-passphrase/m-p/3589791#M18880</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2005-07-26T04:11:11Z</dc:date>
    </item>
    <item>
      <title>Re: track commands using ssh (with passphrase)</title>
      <link>https://community.hpe.com/t5/operating-system-linux/track-commands-using-ssh-with-passphrase/m-p/3589792#M18881</link>
      <description>If you will use the solution described above, you must ensure that the HISTFILE, HISTSIZE environment variable is read only, if this variable is unset or changed to nothing, then the commands will not be logged, and you wont accomplish your objetives.&lt;BR /&gt;&lt;BR /&gt;readonly HISTFILE=path_to_file&lt;BR /&gt;readonly HISTSIZE=10000&lt;BR /&gt;&lt;BR /&gt;Also, is better if set the HISTFILE on a directory that cannot be accesed to any other except root, so it wont be deleted.&lt;BR /&gt;&lt;BR /&gt;There is a command called script, that can help you too. Also, you can enable auditing.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 26 Jul 2005 08:39:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/track-commands-using-ssh-with-passphrase/m-p/3589792#M18881</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2005-07-26T08:39:47Z</dc:date>
    </item>
    <item>
      <title>Re: track commands using ssh (with passphrase)</title>
      <link>https://community.hpe.com/t5/operating-system-linux/track-commands-using-ssh-with-passphrase/m-p/3589793#M18882</link>
      <description>You can make it with /etc/profile easily. Previously, I was suggesting solution for keep tracking ssh connection information. To me command history you have to set HISTFILE as,&lt;BR /&gt;&lt;BR /&gt; --/etc/profile&lt;BR /&gt; set -o vi&lt;BR /&gt; export HISTFILE=$HOME/.ssh_history&lt;BR /&gt; export HISTSIZE=1000&lt;BR /&gt;&lt;BR /&gt;It will setting history file. Anyway, If you want to set it only for SSH login then,&lt;BR /&gt;&lt;BR /&gt; -- /etc/profile --&lt;BR /&gt; ps | grep -q 'ssh'&lt;BR /&gt; if [[ $? -eq 0 ]]&lt;BR /&gt; then&lt;BR /&gt;  set -o vi&lt;BR /&gt;  export HISTFILE=$HOME/.ssh_history&lt;BR /&gt;  export HISTSIZE=1000&lt;BR /&gt; fi&lt;BR /&gt;&lt;BR /&gt;It will be logging ssh related history into $HOME/.ssh_history. &lt;BR /&gt;&lt;BR /&gt;Any terminal login (non cde) will use /etc/profile always.&lt;BR /&gt;&lt;BR /&gt;hth.&lt;BR /&gt;</description>
      <pubDate>Wed, 27 Jul 2005 03:10:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/track-commands-using-ssh-with-passphrase/m-p/3589793#M18882</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-07-27T03:10:05Z</dc:date>
    </item>
    <item>
      <title>Re: track commands using ssh (with passphrase)</title>
      <link>https://community.hpe.com/t5/operating-system-linux/track-commands-using-ssh-with-passphrase/m-p/3589794#M18883</link>
      <description>If HISTFILE and HISTSIZE are both set, HISTSIZE to a reasonable size, the commands should be tracked on the server you are connecting to.&lt;BR /&gt;&lt;BR /&gt;I think you should check ownership/permissions on the server. That might explain the mystery here.&lt;BR /&gt;&lt;BR /&gt;SEP&lt;BR /&gt;Israel</description>
      <pubDate>Thu, 28 Jul 2005 08:56:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/track-commands-using-ssh-with-passphrase/m-p/3589794#M18883</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2005-07-28T08:56:34Z</dc:date>
    </item>
  </channel>
</rss>

