sshfs: How to mount / to local with normal user ssh-login

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
2
down vote

favorite












I want to backup my ubuntu-server to local storage with borgbackup in "pull-style" via sshfs as described here: borgbackup examples -search page for ("pull" style)- . I configured passwordless ssh-login for a normal user via key and disabled root-login for security reasons. I want to mount servers / to a local dir, so sshfs has to login as a normal user and then do root privilege escalation for mounting operation.



How do I tell sshfs to ask for the server's root-password when doing normal user ssh-login? Is this possible at all?







share|improve this question




















  • I don't see how this makes anything safer then allowing root to use (probably only) sshfs/sftp in the first place. I don't think what you want is possible, nor is it more secure.
    – Sebastian Stark
    Apr 21 at 14:50






  • 1




    "How do I tell sshfs to ask for the server's root-password when doing normal user ssh-login? Is this possible at all?" NO.
    – waltinator
    Apr 21 at 14:57










  • IMHO it is generally recommended to disable ssh-root-login for security reasons. A possible attacker in my case needs the private ssh-key including it's password, the name of the non-root user to login and the root-password to get root privileges. This seems a lot more secure to me than a direct root-login with pwd and even with a key.
    – barrios
    Apr 21 at 15:01














up vote
2
down vote

favorite












I want to backup my ubuntu-server to local storage with borgbackup in "pull-style" via sshfs as described here: borgbackup examples -search page for ("pull" style)- . I configured passwordless ssh-login for a normal user via key and disabled root-login for security reasons. I want to mount servers / to a local dir, so sshfs has to login as a normal user and then do root privilege escalation for mounting operation.



How do I tell sshfs to ask for the server's root-password when doing normal user ssh-login? Is this possible at all?







share|improve this question




















  • I don't see how this makes anything safer then allowing root to use (probably only) sshfs/sftp in the first place. I don't think what you want is possible, nor is it more secure.
    – Sebastian Stark
    Apr 21 at 14:50






  • 1




    "How do I tell sshfs to ask for the server's root-password when doing normal user ssh-login? Is this possible at all?" NO.
    – waltinator
    Apr 21 at 14:57










  • IMHO it is generally recommended to disable ssh-root-login for security reasons. A possible attacker in my case needs the private ssh-key including it's password, the name of the non-root user to login and the root-password to get root privileges. This seems a lot more secure to me than a direct root-login with pwd and even with a key.
    – barrios
    Apr 21 at 15:01












up vote
2
down vote

favorite









up vote
2
down vote

favorite











I want to backup my ubuntu-server to local storage with borgbackup in "pull-style" via sshfs as described here: borgbackup examples -search page for ("pull" style)- . I configured passwordless ssh-login for a normal user via key and disabled root-login for security reasons. I want to mount servers / to a local dir, so sshfs has to login as a normal user and then do root privilege escalation for mounting operation.



How do I tell sshfs to ask for the server's root-password when doing normal user ssh-login? Is this possible at all?







share|improve this question












I want to backup my ubuntu-server to local storage with borgbackup in "pull-style" via sshfs as described here: borgbackup examples -search page for ("pull" style)- . I configured passwordless ssh-login for a normal user via key and disabled root-login for security reasons. I want to mount servers / to a local dir, so sshfs has to login as a normal user and then do root privilege escalation for mounting operation.



How do I tell sshfs to ask for the server's root-password when doing normal user ssh-login? Is this possible at all?









share|improve this question











share|improve this question




share|improve this question










asked Apr 21 at 13:21









barrios

1112




1112











  • I don't see how this makes anything safer then allowing root to use (probably only) sshfs/sftp in the first place. I don't think what you want is possible, nor is it more secure.
    – Sebastian Stark
    Apr 21 at 14:50






  • 1




    "How do I tell sshfs to ask for the server's root-password when doing normal user ssh-login? Is this possible at all?" NO.
    – waltinator
    Apr 21 at 14:57










  • IMHO it is generally recommended to disable ssh-root-login for security reasons. A possible attacker in my case needs the private ssh-key including it's password, the name of the non-root user to login and the root-password to get root privileges. This seems a lot more secure to me than a direct root-login with pwd and even with a key.
    – barrios
    Apr 21 at 15:01
















  • I don't see how this makes anything safer then allowing root to use (probably only) sshfs/sftp in the first place. I don't think what you want is possible, nor is it more secure.
    – Sebastian Stark
    Apr 21 at 14:50






  • 1




    "How do I tell sshfs to ask for the server's root-password when doing normal user ssh-login? Is this possible at all?" NO.
    – waltinator
    Apr 21 at 14:57










  • IMHO it is generally recommended to disable ssh-root-login for security reasons. A possible attacker in my case needs the private ssh-key including it's password, the name of the non-root user to login and the root-password to get root privileges. This seems a lot more secure to me than a direct root-login with pwd and even with a key.
    – barrios
    Apr 21 at 15:01















I don't see how this makes anything safer then allowing root to use (probably only) sshfs/sftp in the first place. I don't think what you want is possible, nor is it more secure.
– Sebastian Stark
Apr 21 at 14:50




I don't see how this makes anything safer then allowing root to use (probably only) sshfs/sftp in the first place. I don't think what you want is possible, nor is it more secure.
– Sebastian Stark
Apr 21 at 14:50




1




1




"How do I tell sshfs to ask for the server's root-password when doing normal user ssh-login? Is this possible at all?" NO.
– waltinator
Apr 21 at 14:57




"How do I tell sshfs to ask for the server's root-password when doing normal user ssh-login? Is this possible at all?" NO.
– waltinator
Apr 21 at 14:57












IMHO it is generally recommended to disable ssh-root-login for security reasons. A possible attacker in my case needs the private ssh-key including it's password, the name of the non-root user to login and the root-password to get root privileges. This seems a lot more secure to me than a direct root-login with pwd and even with a key.
– barrios
Apr 21 at 15:01




IMHO it is generally recommended to disable ssh-root-login for security reasons. A possible attacker in my case needs the private ssh-key including it's password, the name of the non-root user to login and the root-password to get root privileges. This seems a lot more secure to me than a direct root-login with pwd and even with a key.
– barrios
Apr 21 at 15:01















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1026941%2fsshfs-how-to-mount-to-local-with-normal-user-ssh-login%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1026941%2fsshfs-how-to-mount-to-local-with-normal-user-ssh-login%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

pylint3 and pip3 broken

Missing snmpget and snmpwalk

How to enroll fingerprints to Ubuntu 17.10 with VFS491