LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-07-2009, 07:53 AM   #1
thangappan
Member
 
Registered: May 2009
Posts: 52

Rep: Reputation: 16
Question ssh requirement


Dear all,


I am using Debian operating system. I am having one requirement in ssh program.

Whenever I put ssh and my machine IP address in any system, I want to log the details of that machine. For an example my machine address is 192.1.1.20. I put ssh from 192.168.2.3.

In the above case, at any time I could the see the details saying that, "in this time you are put ssh to your machine from 192.168.2.3 IP address".



Whether my understanding is wrong?
Or
Is there any way to achieve this?
 
Old 09-07-2009, 08:00 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
Could you please rephrase your question. What do you mean by "put ssh".

Do you mean make a connection?

If you want a log of incoming connections, you can configure syslog-ng to do it. It probably already prints a line in /var/log/messages or /var/log/secure that looks like this:

Aug 31 20:26:47 qosmio sshd[13992]: Accepted publickey for jschiwal from 192.168.1.105 port 41594 ssh2

Look at the /etc/syslog-ng/syslog-ng.conf file. The mail and news entries may make good models to use to add another destination log for sshd.

Last edited by jschiwal; 09-07-2009 at 08:08 AM.
 
Old 09-08-2009, 03:48 AM   #3
thangappan
Member
 
Registered: May 2009
Posts: 52

Original Poster
Rep: Reputation: 16
Thumbs down Clarification

The question is simple,

Let consider A and B is working in one network(192.168.1.*)
AND
C and D is working in another network(192.168.2.*)

Now A wants to work from the D system(192.168.2.*) with his login.So He put ssh connection to his machine(192.168.1.*)

$ ssh A@192.168.1.1 -tX

Here is my question.

I want to log the details
From which machine A put ssh connection to his system
Who is currently using that machine
On what time I used that command.

In the above case the details could be
machine IP 192.168.2.*
Name D
Time Current time when he used that command.


Is it possible to do?


I think this explanation is enough? Please help me...........
 
Old 09-08-2009, 04:46 AM   #4
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Quote:
Originally Posted by thangappan View Post
The question is simple,
does not seem like that or it would be answered

Quote:
Originally Posted by thangappan View Post
Is it possible to do?

I think this explanation is enough? Please help me...........
Sure it is jschiwal already answered it (Hm maybe it is an easy question ) Check out your /var/log/secure file. There should be listed all the logins that ocurred. If not dig on the syslog.conf manpage a bit or skim the net for a howto
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
PC requirement for Linux ssriram84.@gmail.com Linux - General 11 07-27-2009 03:35 AM
fedora requirement shadowsurfer Linux - Newbie 1 09-09-2004 08:48 PM
ADSL requirement Ricio General 5 08-11-2004 05:33 PM
what is the requirement tony2666 Fedora - Installation 1 05-20-2004 03:58 PM
Requirement for Beginners jcornel7 Programming 13 02-08-2003 10:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration