[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: command to start sshfs at bootup?



On Saturday 17 April 2021 20:26:19 Greg Wooledge wrote:

> On Sat, Apr 17, 2021 at 08:11:37PM -0400, Gene Heskett wrote:
> > I just checked this machine and 4 others, all of whom are mounted to
> > their own named directory as subdirs of /sshnet, which work
> > perfectly without a mention of it in any machines /etc/fstab. Adding
> > the new machine as the last line in this $HOME/bin/mount-machines
> > bash script: ------------
> > #!/bin/bash
> > sshfs gene@sixty40.coyote.den:/ /sshnet/sixty40
> > sshfs gene@lathe:/              /sshnet/lathe
> > sshfs gene@GO704:/              /sshnet/GO704
> > sshfs pi@rpi4:/			/sshnet/rpi4
> > sshfs gene@TLM:/		/sshnet/TLM
> > sshfs gene@3dprint:/		/sshnet/3dprint
> > --------------
> > Thats 5 machines that Just Work, and the last says:
> >
> > read: Connection reset by peer
> >
> > sshfs has been installed, but its not running.  How do I start it?
>
> I read this about 5 times trying to figure out what you're actually
> saying.  I find it very confusing.
>
> Near as I can tell after all those attempts to read it, you have ONE
> client machine and SIX server machines.

the other way around generally  although I have inverted the operation in 
order to get something from his machine to anotheer machine on my farm.

> You are trying to set up 6 
> separate sshfs mounts, all from the same client machine, one to each
> of your servers.
>
> Based on the pathname of the script that you give, you appear to be
> trying to do this from an interactive shell.
yes, bash, as me. Root is disallowed. So it only works aas me, although I 
cann ssh into the other machine and then become root with a sudo.

> Not at boot time, not at 
> login time, not using cron, not using a systemd unit, not using
> /etc/rc.local, not using a sysv-rc init.d script, not using any kind
> of automounting.

correct

>
> Now, as near as I can tell from your message, your problem comes down
> to this:
>
>   From an interactive shell, I run the command
>     sshfs gene@3dprint:/ /sshnet/3dprint
>
>   and I get the error
>     read: Connection reset by peer
>
> The first probable cause that comes to mind for me is that the sshd or
> the SFTP subsystem of sshd on this "3dprint" host is not working
> properly. Check the logs on that host and look for anything that might
> tell you more.

no mention of sshfs in the logs of the other machines that are Just 
Working.

> Also try the typical steps that one would try when debugging an sshfs
> connection:
>
> 1) Does "getent hosts 3dprint" give me the correct IP address?
no, despite this line in my /etc/hosts
192.168.71.45   3dprint.coyote.den            3dp

> 2) Can I ping it?
yes as 3dprint, also as the alias 3dp

> 3) Can I ssh into it?  As gene?
yes
> 4) Can I sftp into it?  As gene?

haven't tried that, normally use mc, as me to shift things around.


> 5) If any of the above fail, is there an error message that appears in
> the logs on either system at the same time?
no.

> Any additional debugging step recommendations would need to be based
> on yet-to-be-revealed details.  E.g. there's no point trying something
> like "ssh -vvv" if you can't even ping the machine.
Humm, I just recalled that I had to rename another machine to sixty40 as 
6040 was apparently not a valid hostname. I now wonder if I should 
rename that machine to threedeeprint.domain.name.

That has to be it, I'll change that and try it tomorrow


Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/gene>


Reply to: