Topic "How to send remote command "su - root"?"

Author Message
jsherk
[View user's profile]

Joined: 2010-07-05
Posts: 35
Location: United States
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
Code:
Environment > SCP/Shell > Shell: sudo su -
but this gives an error, and it will only connect properly if this is set to
Code:
Environment > SCP/Shell > Shell: /bin/bash


If I choose
Code:
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
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
jsherk wrote:
When I connect using SCP, I have tried setting
Code:
Environment > SCP/Shell > Shell: sudo su -
but this gives an error, and it will only connect properly if this is set to
Code:
Environment > SCP/Shell > Shell: /bin/bash

Please read FAQ. If that does not help, come back.

Quote:
If I choose
Code:
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.

Quote:
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
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
prikryl wrote:
Quote:
If I choose
Code:
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
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License