LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-28-2008, 11:07 PM   #1
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Rep: Reputation: 31
remote login


I have a two unix server ( serverA and serverB ) , I checked that a login in serverA ( who -u |grep pts/30) , this pts is from serverB (by telnet) , if I want to know which user (IP address) in serverB use the login ID "ora_usr" to login serverA , what can i do ? thx

serverA
======
#who -u |grep pts/30
ora_usr pts/30 Apr 29 11:45 serverB
 
Old 04-29-2008, 04:15 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
You might want to try "ps -ftpts/30" to see all the processes running there. Its possible someone logged in as someone else then did an su to the ora user.

If it was done via ssh then doing "ps -ef |grep pts/30" ought to show you which sshd process is associated with pts/30.

You can then run "lsof -p <pid> |grep \>" on serverA where <pid> is the process ID revealed for sshd above and \> is literal. You would want to look at lines. This will give you the connection information similar to:

sshd 2483 orauser 3u IPv6 123965389 TCP serverA:ssh->serverB:58712 (ESTABLISHED)

If you then go to serverB and run "lsof |grep "serverA:ssh->serverB:58712" you should find the PID and user in the lsof output from serverB.

Note: serverA:ssh->serverB:58712 is an EXAMPLE only - you would need to figure out what goes there from the output you got from the original lsof.
 
  


Reply



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
how to make remote login and remote installation via libssh vdx Programming 5 09-10-2007 10:23 PM
Remote login with SSH, but display on remote computer. brodin Linux - Software 3 09-09-2007 03:01 AM
remote login screen but need local login lastkey Ubuntu 0 12-13-2006 01:41 AM
remote x login instead of local login mandrake-n00b Mandriva 0 04-22-2005 09:19 PM
Remote Login SBFree Linux - Newbie 7 11-15-2004 05:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:16 AM.

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
Open Source Consulting | Domain Registration