- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- SSH - logging - again
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
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
04-02-2008 09:27 AM
04-02-2008 09:27 AM
SSH - logging - again
We have MANY servers that MANY S/A's log into with a shared account (say saadm).
The problem is we need to track which S/A actually logged into the server.
Is there a way to turn on some ssh logging that shows which key/phrase was used to login so we can tell which S/A actually logged in?
I've tried various debug levels, it seems to only show the IP the connection came from, not the key that was used to gain access to the shared account.
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2008 09:54 AM
04-02-2008 09:54 AM
Re: SSH - logging - again
If the keyphrase were logged it would compromise the security of SSH.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2008 09:56 AM
04-02-2008 09:56 AM
Re: SSH - logging - again
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2008 11:57 AM
04-02-2008 11:57 AM
Re: SSH - logging - again
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2008 12:00 PM
04-02-2008 12:00 PM
Re: SSH - logging - again
Ideas?
Anyone?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2008 12:04 PM
04-02-2008 12:04 PM
Re: SSH - logging - again
A shared account and tracking who uses that account are generally mutually exclusive requirements.
This shows why this is a bad practice. When something happens, you will not know who actually caused the problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2008 12:19 PM
04-02-2008 12:19 PM
Re: SSH - logging - again
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2008 12:38 PM
04-02-2008 12:38 PM
Re: SSH - logging - again
You're already using public key auth, which is the big hurdle I've seen in the past because it moves so much control off of the server and on to the desktop. I don't see why you couldn't use personal accounts with locked passwords and key authentication instead of a shared account.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2008 06:47 PM
04-02-2008 06:47 PM
Re: SSH - logging - again
Since you are using ssh, there is a much, much easier mechanism. Use public keys between the servers. You can setup a user account on 100 servers in a few seconds with scripting. Then create the public key on each server with ssh-keygen and pull a copy of the public key into a local authorized_keys file. Then copy that composite key file to all the servers under that user's login. Now each server can authenticate to every other server without using a password. This assumes that all SA's are trusted users.
Password changes can be automated with expect scripts or they can be eliminated with sshd config file settings (public key or nothing).
Other than that, the only data you can capture is the user's IP address. Use something like who -muR and grab the last field in /etc/profile like this:
IPADDR=$(who -muR | awk '{print $NF}')
Then write the userID and the IP address to a logfile. At least you'll have some idea what PC or system was used to login.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2008 01:18 AM
04-03-2008 01:18 AM
Re: SSH - logging - again
we were faced with a similar wish because we Unix admins share a common login account with RSA key authorization from which we su into the root account on a remote host.
The workaround I suggested then was based on the fact that the format of the authorized_keys file (as described in man sshd) allows for each key therein to be prepended by a comma separated list of options,
of which one is called "environment", and which may appear repeatedly.
This then would enable any admin user to place in his RSA public key file some environment variable such as e.g.
environment="SAADM_USER=jeff" 1024 35 121343091Ã 88297...
The admins' real user's public key should be distributed via cronjob script from your central admin login server to all the hosts they require access to, and appended to the ~saadm/.ssh/authorized_keys on each host.
However, to make the remote hosts' sshd processes honour user defined environment variables you must set PermitUserEnvironment to yes in the /etc/ssh/sshd_config file of those hosts and send their sshd a SIGHUP.
But beware, and read the warning in man sshd_config about possible perils with library preloading exploits if this per default disabled feature is enabled (see below)
Then to make use of the propagated admin's identity you could fiddle some rc script which would refer to SAADM_USER and which you place in ~saadm/.ssh/rc (read man sshd).
It must be said that this is no enforced security and can easily be subverted by the admin users.
It is only meant as one possible way to track the user's origin within a trusted community of admin peers.
PermitUserEnvironment
Specifies whether ~/.ssh/environment and environment= options in
~/.ssh/authorized_keys are processed by sshd. The default is "no".
Enabling environment processing may enable users to bypass access
restrictions in some configurations using mechanisms such as
LD_PRELOAD.