sshfs in fstab: addressing same server through different networkssshfs always asking for password in...

Require advice on power conservation for backpacking trip

Vanishing of certain coefficients coming from Coxeter groups

Intuition for capacitors in series

Why doesn't a marching band have strings?

What was the Shuttle Carrier Aircraft escape tunnel?

Interaction between Leyline of Anticipation and Teferi, Time Raveler

Apply brace expansion in "reverse order"

A STL-like vector implementation in C++

Can White Castle?

Hot coffee brewing solutions for deep woods camping

What reason would an alien civilization have for building a Dyson Sphere (or Swarm) if cheap Nuclear fusion is available?

Is a single radon-daughter atom in air a solid?

Should I prioritize my 401(k) over my student loans?

Is there a way to split the metadata to custom folders?

Are there any efficient algorithms to solve longest path problem in networks with cycles?

How do I respond to requests for a "guarantee" not to leave after a few months?

What are the penalties for overstaying in USA?

C-152 carb heat on before landing in hot weather?

What is the origin of Scooby-Doo's name?

Is my Rep in Stack-Exchange Form?

How dangerous are set-size assumptions?

How to split an equation in two lines?

Set multicolumn to a exact width

The Target Principal Name Is Incorrect. Cannot Generate SSPI Context (SQL or AD Issue)?



sshfs in fstab: addressing same server through different networks


sshfs always asking for password in fstab?sshfs breaks symlinks from SFTP serverForce reconnect on sshfs drive mounted via fstabIs fstab syntax the same as mount?SSHFS in fstab requests password even though user connects fine using keyfilesshfs through multiple hosts?SSHFS in fstab: Is there logging?SSHFS permissions not correct when mounted with fstabsshfs through two hops?How to make an fstab entry for sshfs on non-standard SSH port and using ssh key






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















Host and Client Ubuntu 19.04. OpenSSH


I have a SSH server in my home LAN that I mount to my laptop using the LAN network address. When I'm at my weekend hideaway, I have to change my fstab to mount through my router's external IP address.



My router does not support loopback so I can't use the external IP when I'm in the LAN.



My approach has been to keep two sections in my fstab. One for the LAN and one for the external IP. Then I comment out the fstab lines to suit my location.



I wonder if there is a better way.



I can leave both sections open. I use the nofail option so the boot process is not aborted but the startup is extremely slow. I tried putting ConnectionTimeout=5in the sshfs options but this doesn't improve the boot time.



It's not a critical issue obviously, just a nice-to-have. Some conditional mounting? Or perhaps setting the timeout is not as simple as I've assumed.










share|improve this question

























  • Which OS are you using?

    – muru
    1 hour ago











  • @muru oops good point. just a sec.

    – Stephen Boston
    1 hour ago











  • mount can be done dynamically later after the boot (/etc/init.d is a good place to hold this script), this way you can test/ping/whatever before actual mount.

    – Archemar
    59 mins ago











  • @Archemar Okay. Ubuntu 19.04 uses systemd and I have a notion that systemd and init.d are not naturally friendly. Could be just nerves, I suppose, but thanks. I'll check that out in the morning.

    – Stephen Boston
    54 mins ago











  • @StephenBoston the idea can work just as well with systemd (better perhaps, you can have filesystems dependent on other units, and you can have a unit that checks for either network)

    – muru
    8 mins ago


















0















Host and Client Ubuntu 19.04. OpenSSH


I have a SSH server in my home LAN that I mount to my laptop using the LAN network address. When I'm at my weekend hideaway, I have to change my fstab to mount through my router's external IP address.



My router does not support loopback so I can't use the external IP when I'm in the LAN.



My approach has been to keep two sections in my fstab. One for the LAN and one for the external IP. Then I comment out the fstab lines to suit my location.



I wonder if there is a better way.



I can leave both sections open. I use the nofail option so the boot process is not aborted but the startup is extremely slow. I tried putting ConnectionTimeout=5in the sshfs options but this doesn't improve the boot time.



It's not a critical issue obviously, just a nice-to-have. Some conditional mounting? Or perhaps setting the timeout is not as simple as I've assumed.










share|improve this question

























  • Which OS are you using?

    – muru
    1 hour ago











  • @muru oops good point. just a sec.

    – Stephen Boston
    1 hour ago











  • mount can be done dynamically later after the boot (/etc/init.d is a good place to hold this script), this way you can test/ping/whatever before actual mount.

    – Archemar
    59 mins ago











  • @Archemar Okay. Ubuntu 19.04 uses systemd and I have a notion that systemd and init.d are not naturally friendly. Could be just nerves, I suppose, but thanks. I'll check that out in the morning.

    – Stephen Boston
    54 mins ago











  • @StephenBoston the idea can work just as well with systemd (better perhaps, you can have filesystems dependent on other units, and you can have a unit that checks for either network)

    – muru
    8 mins ago














0












0








0








Host and Client Ubuntu 19.04. OpenSSH


I have a SSH server in my home LAN that I mount to my laptop using the LAN network address. When I'm at my weekend hideaway, I have to change my fstab to mount through my router's external IP address.



My router does not support loopback so I can't use the external IP when I'm in the LAN.



My approach has been to keep two sections in my fstab. One for the LAN and one for the external IP. Then I comment out the fstab lines to suit my location.



I wonder if there is a better way.



I can leave both sections open. I use the nofail option so the boot process is not aborted but the startup is extremely slow. I tried putting ConnectionTimeout=5in the sshfs options but this doesn't improve the boot time.



It's not a critical issue obviously, just a nice-to-have. Some conditional mounting? Or perhaps setting the timeout is not as simple as I've assumed.










share|improve this question
















Host and Client Ubuntu 19.04. OpenSSH


I have a SSH server in my home LAN that I mount to my laptop using the LAN network address. When I'm at my weekend hideaway, I have to change my fstab to mount through my router's external IP address.



My router does not support loopback so I can't use the external IP when I'm in the LAN.



My approach has been to keep two sections in my fstab. One for the LAN and one for the external IP. Then I comment out the fstab lines to suit my location.



I wonder if there is a better way.



I can leave both sections open. I use the nofail option so the boot process is not aborted but the startup is extremely slow. I tried putting ConnectionTimeout=5in the sshfs options but this doesn't improve the boot time.



It's not a critical issue obviously, just a nice-to-have. Some conditional mounting? Or perhaps setting the timeout is not as simple as I've assumed.







fstab sshfs






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 1 hour ago







Stephen Boston

















asked 1 hour ago









Stephen BostonStephen Boston

2593 silver badges11 bronze badges




2593 silver badges11 bronze badges













  • Which OS are you using?

    – muru
    1 hour ago











  • @muru oops good point. just a sec.

    – Stephen Boston
    1 hour ago











  • mount can be done dynamically later after the boot (/etc/init.d is a good place to hold this script), this way you can test/ping/whatever before actual mount.

    – Archemar
    59 mins ago











  • @Archemar Okay. Ubuntu 19.04 uses systemd and I have a notion that systemd and init.d are not naturally friendly. Could be just nerves, I suppose, but thanks. I'll check that out in the morning.

    – Stephen Boston
    54 mins ago











  • @StephenBoston the idea can work just as well with systemd (better perhaps, you can have filesystems dependent on other units, and you can have a unit that checks for either network)

    – muru
    8 mins ago



















  • Which OS are you using?

    – muru
    1 hour ago











  • @muru oops good point. just a sec.

    – Stephen Boston
    1 hour ago











  • mount can be done dynamically later after the boot (/etc/init.d is a good place to hold this script), this way you can test/ping/whatever before actual mount.

    – Archemar
    59 mins ago











  • @Archemar Okay. Ubuntu 19.04 uses systemd and I have a notion that systemd and init.d are not naturally friendly. Could be just nerves, I suppose, but thanks. I'll check that out in the morning.

    – Stephen Boston
    54 mins ago











  • @StephenBoston the idea can work just as well with systemd (better perhaps, you can have filesystems dependent on other units, and you can have a unit that checks for either network)

    – muru
    8 mins ago

















Which OS are you using?

– muru
1 hour ago





Which OS are you using?

– muru
1 hour ago













@muru oops good point. just a sec.

– Stephen Boston
1 hour ago





@muru oops good point. just a sec.

– Stephen Boston
1 hour ago













mount can be done dynamically later after the boot (/etc/init.d is a good place to hold this script), this way you can test/ping/whatever before actual mount.

– Archemar
59 mins ago





mount can be done dynamically later after the boot (/etc/init.d is a good place to hold this script), this way you can test/ping/whatever before actual mount.

– Archemar
59 mins ago













@Archemar Okay. Ubuntu 19.04 uses systemd and I have a notion that systemd and init.d are not naturally friendly. Could be just nerves, I suppose, but thanks. I'll check that out in the morning.

– Stephen Boston
54 mins ago





@Archemar Okay. Ubuntu 19.04 uses systemd and I have a notion that systemd and init.d are not naturally friendly. Could be just nerves, I suppose, but thanks. I'll check that out in the morning.

– Stephen Boston
54 mins ago













@StephenBoston the idea can work just as well with systemd (better perhaps, you can have filesystems dependent on other units, and you can have a unit that checks for either network)

– muru
8 mins ago





@StephenBoston the idea can work just as well with systemd (better perhaps, you can have filesystems dependent on other units, and you can have a unit that checks for either network)

– muru
8 mins ago










0






active

oldest

votes














Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
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',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f526166%2fsshfs-in-fstab-addressing-same-server-through-different-networks%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f526166%2fsshfs-in-fstab-addressing-same-server-through-different-networks%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...