This widget could not be displayed.
1845515 Members
2964 Online
110244 Solutions
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
New Discussion
This widget could not be displayed.
This widget could not be displayed.

remote login

 
SOLVED
Go to solution
haeman
Frequent Advisor

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
10 REPLIES 10
Ramesh S
Esteemed Contributor
Solution

Re: remote login

Hi

"ora_usr" from serverB has logged in serverA.

Oracle must be using the "ora_usr" id. Have a look on /etc/passwd file.

Best Regards,
Ramesh
Jeeshan
Honored Contributor

Re: remote login

#who -a|grep
a warrior never quits
haeman
Frequent Advisor

Re: remote login

thx replies,

ora_usr is common user , so I don't know which user use this login at the time .

thx
Ramesh S
Esteemed Contributor

Re: remote login

HI

In that case, do "last -R" to know the IP address from that user logged in.

Best Regards,
Ramesh
haeman
Frequent Advisor

Re: remote login

thx Ramesh S

I think the last -R in serverB only show who is logging in serverB , but can't show who is using telnet to connect serverA , for example , there are 10 user use ora_usr to telnet to serverA , how do I know who is who ? thx
Ramesh S
Esteemed Contributor

Re: remote login

Hi

I guess, You can only see the IP address/system name only from where user id 'ora_usr' logged in.

Best Regards,
Ramesh
OFC_EDM
Respected Contributor

Re: remote login

Unfortunately I don't have lsof on my system so I can't check.

But lsof which lists open files "might" have information to help find out who has a telnet session open.

lsof gives an understanding of the relationship of processes to open files descriptor and sockets and much more.

May be worth a shot looking at it.

If I get a chance I'll install it and see if it will be of any use.
The Devil is in the detail.
OFC_EDM
Respected Contributor

Re: remote login

I did find this post from someone who was trying to find the IP on the other end of a Telnet session.

"On Unix one may use 'lsof' (if available) and grep on the shell pid and
file descriptor 0 to find the line containing the source ip addr. In
some flavors of Unix the /proc filesystem can also be of help."

Sounds like lsof may be of help after all.
The Devil is in the detail.
OFC_EDM
Respected Contributor

Re: remote login

or try

who -mu

That command showed my machine name including domain for my ssh session.

Which I then used nslookup to get the IP.

I think it would work for telnet too.
The Devil is in the detail.
haeman
Frequent Advisor

Re: remote login

thx reply ,

the lsof can show the remote IP , but how to know which user ( from 10 of them ) is this login session ?

for nslookup , you mean run it at serverB ? I tried to use nsloopup IP but not work, can advise how to use it ? thx

#man nslookup
nslookup -query=hinfo -timeout=10