Nautilus SFTP with sudo

I have an Ubuntu VM. From that VM i want to connect to other servers.

In Nautilus you can connect to other servers via sftp:

But you cant access all folders:

image
(I took root as an example)

In WinSCP there is a feature that allows you to connect with elevated permissions. Under Options > SFTP you can set SFTP-Server to sudo su -c /usr/lib/sftp-server.

In Ubuntu i managed to also make it work: sftp -s "sudo su -c /usr/lib/sftp-server" HOST

But I cant do that in Nautilus with the integrated File Explorer. The Libary that makes the SFTP connection only respects the ssh-config. I tried different options from Ubuntu Manpages, but I had no success so far.

Is it possible to open a connection in nautilus with elevated permission?

Thanks in advance.

Local and remote privileges can be elevated with the following URIs:

admin://
sftp://root@server

The latter requires to allow root login on the server.
Each URI can be saved as a bookmark.

1 Like

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.