get logged in username
- From: Mohsen Alimomeni <m.alimomeni@xxxxxxxxx>
- Date: Thu, 17 Sep 2009 11:15:12 +0430
Hi,
How can I get the logged in username under remote command execution? I
am using openssh version 4.0 under fedora core 4.
more explanation:
when I do "ssh admin@host", I can get the username "admin", by the
command "who -m", since there is tty which the username is assigned to
it. But suppose I want to execute a remote command "ssh admin@host
myprog", I want to get the username inside the myprog. The command
"who -m", doesn't work because no tty is created for the user.
How can I get the username in this case?
Regards,
--
__ \ /_\\_-//_ Mohsen Alimomeni
- Follow-Ups:
- Re: get logged in username
- From: Kevin Brott
- Re: get logged in username
- From: H. Kurth Bemis
- Re: get logged in username
- From: Greg Wooledge
- Re: get logged in username
- From: Aarón Mizrachi
- Re: get logged in username
- From: Dan Nelson
- RE: get logged in username
- From: Dennis Taylor
- Re: get logged in username
- Prev by Date: RE: logging file names with sftp
- Next by Date: RE: get logged in username
- Previous by thread: logging file names with sftp
- Next by thread: RE: get logged in username
- Index(es):
Relevant Pages
|