How to send remote command "su - root"?

Advertisement

jsherk
Joined:
Posts:
35
Location:
United States

How to send remote command "su - root"?

I am connecting to a remote CentOS 5 machine, and root login is not permitted, so I would like to run the command "su - root" after login to gain root privileges.

When I connect using SCP, I have tried setting
Environment > SCP/Shell > Shell: sudo su -
but this gives an error, and it will only connect properly if this is set to
Environment > SCP/Shell > Shell: /bin/bash

If I choose
File > Custom Command > Enter...:
and then type su - root as the Remote Custom command with 'Show Results in Terminal' UNchecked, I get an Invalid Access To Memory error.

If I type the same Remote Custom command with 'Show Results in Terminal' checked, I get a Command Failed with return code 1 and error message standard in must be tty.

Is there anyway for me to execute this su - root command and have it ask me for a password after (or during) the regular login?

Using v4.2.8 on Win XP Pro sp3.

Thanks

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
28,542
Location:
Prague, Czechia

Re: How to send remote command "su - root"?

jsherk wrote:

When I connect using SCP, I have tried setting
Environment > SCP/Shell > Shell: sudo su -
but this gives an error, and it will only connect properly if this is set to
Environment > SCP/Shell > Shell: /bin/bash
Please read FAQ. If that does not help, come back.

If I choose
File > Custom Command > Enter...:
and then type su - root as the Remote Custom command with 'Show Results in Terminal' UNchecked, I get an Invalid Access To Memory error.
I'll send you a debug version to resolve this.

Is there anyway for me to execute this su - root command and have it ask me for a password after (or during) the regular login?
No. It is explained in the FAQ above.
_________________
Martin Prikryl

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
28,542
Location:
Prague, Czechia

Re: How to send remote command "su - root"?

martin wrote:

If I choose
File > Custom Command > Enter...:
and then type su - root as the Remote Custom command with 'Show Results in Terminal' UNchecked, I get an Invalid Access To Memory error.
I'll send you a debug version to resolve this.
This bug has been added to tracker.
_________________
Martin Prikryl

Reply with quote

Advertisement

You can post new topics in this forum