nixCraft Linux Forum

nixCraft

Linux / UNIX Tech Support Forum

Log all SSH commands at ssh-client

This is a discussion on Log all SSH commands at ssh-client within the Getting started tutorials forums, part of the Linux Getting Started category; Hello, Is there any way to Log all SSH commands at ssh-client side. Thanks, Abhi...


Go Back   nixCraft Linux Forum > Linux Getting Started > Getting started tutorials

Linux answers from nixCraft.


Getting started tutorials So much to read, so little time! If that is your problem, we have solution. Read our FAQ and tutorials to help you cut through the clutter of information overload. Only members of "contributors" group can post new tutorials. Other members can just reply to thread.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 24-11-2007, 12:35 AM
Junior Member
User
 
Join Date: Nov 2007
OS: FC6
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
abhijith is on a distinguished road
Default Log all SSH commands at ssh-client

Hello,

Is there any way to Log all SSH commands at ssh-client side.

Thanks,
Abhi
Reply With Quote
  #2 (permalink)  
Old 24-11-2007, 02:31 AM
jesse's Avatar
Junior Member
User
 
Join Date: Aug 2007
OS: gentoo&debian
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
jesse is on a distinguished road
Default

You can use script for that. Script can make typescript of terminal sessions, also persistant through establishing and working on ssh sessions. The script command is part of the util-linux-ng package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.
__________________
teh.geekosphere.org
Reply With Quote
  #3 (permalink)  
Old 24-11-2007, 02:44 AM
Junior Member
User
 
Join Date: Nov 2007
OS: FC6
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
abhijith is on a distinguished road
Default

Thanks for the quick reply

on googling i can see that we can use reverse ssh tunneling for this. any lights on this idea ???

My aim is to setup a key server. i have a number of target servers. so on ssh ing to these servers, i have to log all ssh commands in my key server


Thanks,
Abhi

Last edited by abhijith; 24-11-2007 at 02:46 AM.
Reply With Quote
  #4 (permalink)  
Old 24-11-2007, 11:05 AM
monk's Avatar
Senior Member
User
 
Join Date: Jan 2005
Location: Tibet
OS: Debian GNU/Linux
Posts: 506
Thanks: 0
Thanked 8 Times in 6 Posts
Rep Power: 7
monk has a spectacular aura about monk has a spectacular aura about
Default

I recommend running server side command monitoring.
How to keep a detailed audit trail of what’s being done on your Linux systems
__________________
May the force with you!
Reply With Quote
  #5 (permalink)  
Old 24-11-2007, 10:17 PM
Junior Member
User
 
Join Date: Nov 2007
OS: FC6
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
abhijith is on a distinguished road
Default

Hello Thanks for the reply

Anyway Here is my requirement in short:
I just want to log all ssh commands at ssh-client machine that are being executed at the SSH server

In other words: I know a brief history of all executed commands on a linux machine can be retrieved from "bash history". I would like to get this info available also at the ssh-client machine (if possible, with more details like timestamp.


Abhi
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
See what commands have been run on your Linux server sweta Getting started tutorials 5 30-04-2008 03:38 AM
How to monitor RSH commands mformit Solaris/OpenSolaris 0 11-04-2008 09:44 PM
basic commands? seshaionline Getting started tutorials 7 24-03-2008 11:30 PM
Commands required to monitor a Solaris servers ramrishie Solaris/OpenSolaris 2 22-01-2008 05:17 AM
using shell commands in C steve Coding in General 2 14-10-2005 09:25 AM


All times are GMT +5.5. The time now is 12:16 PM.


Powered by vBulletin® Version 3.8.5 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38