- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- track commands using ssh (with passphrase)
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2005 09:02 PM
07-25-2005 09:02 PM
I noticed that by default, without passphrase, commands are logged in .bash_history file. Otherwise using passprhase, commands are not saved anywhere.
How could I manage?
Thank You.
Leonardo.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2005 09:04 PM
07-25-2005 09:04 PM
Re: track commands using ssh (with passphrase)
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2005 09:11 PM
07-25-2005 09:11 PM
SolutionSomething to verify on one of your passphrase sessions is to the content of the 'HISTFILE' environment variable:
echo $HISTFILE
It should point to '.bash_history' in the user's home directory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2005 01:39 AM
07-26-2005 01:39 AM
Re: track commands using ssh (with passphrase)
readonly HISTFILE=path_to_file
readonly HISTSIZE=10000
Also, is better if set the HISTFILE on a directory that cannot be accesed to any other except root, so it wont be deleted.
There is a command called script, that can help you too. Also, you can enable auditing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2005 08:10 PM
07-26-2005 08:10 PM
Re: track commands using ssh (with passphrase)
--/etc/profile
set -o vi
export HISTFILE=$HOME/.ssh_history
export HISTSIZE=1000
It will setting history file. Anyway, If you want to set it only for SSH login then,
-- /etc/profile --
ps | grep -q 'ssh'
if [[ $? -eq 0 ]]
then
set -o vi
export HISTFILE=$HOME/.ssh_history
export HISTSIZE=1000
fi
It will be logging ssh related history into $HOME/.ssh_history.
Any terminal login (non cde) will use /etc/profile always.
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2005 01:56 AM
07-28-2005 01:56 AM
Re: track commands using ssh (with passphrase)
I think you should check ownership/permissions on the server. That might explain the mystery here.
SEP
Israel
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com