in reply to Re: Re: Net::SSH::Perl and su
in thread Net::SSH::Perl and su

something I really don't get is:
"Why ssh to a remote machine (as a regular user), THEN su to root?"
Assuming the user is "hossman" on both machines, you're doing this...
    hossman@client =ssh=> hossman@server =su=> root@server

Why not do this instead...

    hossman@client =ssh=> root@server

(sudo is nice because it eliminates the need for hossman to know the root password on server, but the same thing could be accomplished using ssh keys.)

Replies are listed 'Best First'.
Re: Re: Re: Re: Net::SSH::Perl and su
by Juerd (Abbot) on Mar 08, 2002 at 23:59 UTC

    "Why ssh to a remote machine (as a regular user), THEN su to root?"

    Because many ssh servers block direct root logins, so you need at least two passwords to get a root shell. (in general)

    44696420796F7520732F2F2F65206F
    7220756E7061636B3F202F6D736720
    6D6521203A29202D2D204A75657264
    

Re^4: Net::SSH::Perl and su
by Anonymous Monk on Aug 19, 2015 at 16:48 UTC
    Root user not allowed to log in directly. You only log in as regular user then su to root.