Any way to use sftp as superuser?

4

I'm using Transmit.app (in Mac) to sftp to my Ubuntu server. Is there any way to gain superuser permission so that I can remotely write any file?

Mehdi

Posted 2012-07-27T13:33:29.957

Reputation: 141

Have you tried logging in as root on the Ubuntu Server? Does it work then? – Daniel Andersson – 2012-07-27T13:38:16.507

Yes, I've enabled root in Ubuntu. I can ssh to it as root, but sftp doesn't work. – Mehdi – 2012-07-27T14:43:45.873

Answers

2

It's generally not recommended that you allow direct root remote access. If you enable direct root login via SSH, anyone could attempt to brute-force your root password, at which point they can do whatever they like with your server.

That said, if you're set on doing this, you should set up public key login, as it's more secure than password-based login. That page includes instructions on how to set this up for root. Once you have that configured, you can configure your SFTP client to login via key rather than password.

ND Geek

Posted 2012-07-27T13:33:29.957

Reputation: 802

0

Why not using SCP ?

There is a good client for osx -> click

It's over SSH and allows you to login on whatever user as long as it is allowed to login via ssh.

mnmnc

Posted 2012-07-27T13:33:29.957

Reputation: 3 637

1Using scp will be no problem. Does cyberduck allow to pass sudo where necessary? – Mehdi – 2012-07-27T14:23:46.420

I found similar sudo question here: http://stackoverflow.com/questions/3381498/how-to-use-sudo-over-sftp-with-cyberduck

– mnmnc – 2012-07-27T14:34:08.987