Re: how to figure out the username for ssh?



zix wrote:
Hi,
when I login via ssh to my linux machine, is there any way to know
my login name? Lets say, I have a user Alex, having uid and euid as
0,0(root user). Now, if I am logging via ssh, getlogin does not work.
If I do getuid, and proceed from there I will get it as root. Is there
any way to figure out that my user id is "Alex" and not root?


I usually use the "id" command.
.



Relevant Pages

  • Re: BSM, SSH, and Session ID
    ... Are you logging in as root through ssh or is that just the way it is ... Sun SSH/OpenSSH should fork off before the login because the sshd ... It should always be a different session, ...
    (Focus-SUN)
  • Re: telnet as root question
    ... >> make securetty tell telnet and SSH apart? ... >login program after opening the pts. ... >check securetty to know if root login is allowed. ...
    (comp.os.linux.security)
  • Re: BSM, SSH, and Session ID
    ... I can't recall how Sun SSH on Solaris 9 behaves but recent versions of Sun SSH/OpenSSH should fork off before the login because the sshd process that a user is connected to after authentication runs with their privileges, ... It should always be a different session, even if the user login is root. ...
    (Focus-SUN)
  • RE: Login restrictions in NIS environment
    ... to ban root from logging in remotely except from certain IP addresses. ... but it does not allow root to login even from ... > stack is called by both login and ssh access. ...
    (RedHat)
  • Re: ssh to remote machine with user login problem
    ... > machine.When i login as root ssh to remote machoine will work without ... You need to copy the 'authorized_keys' file from the ssh directory of the root ...
    (Debian-User)