You are not logged in.
I have a partition on my TrueNAS server that I access via ssh only. I just installed my new PC and I wanted to mount that partition more easily through fstab so that I can access it in Dolphin. I have the following line added to fstab:
freenasuser@192.168.0.15:/mnt/freenaspool/freenasdataset/ /mnt/freenaspool fuse.sshfs x-systemd.automount,_netdev,user,idmap=user,transform_symlinks,identityfile=/home/af/.ssh/id_rsa,allow_other,default_permissions,uid=1000,gid=1000 0 0
but it fails during boot up and jounrnalctl reports this:
aug 28 07:19:22 andre-amd systemd[1]: mnt-freenaspool.automount: Got automount request for /mnt/freenaspool, triggered by 1029 (kded6)
aug 28 07:19:22 andre-amd systemd[1]: Mounting /mnt/freenaspool...
aug 28 07:19:22 andre-amd mount[1268]: read: Connection reset by peer
aug 28 07:19:22 andre-amd systemd[1]: mnt-freenaspool.mount: Mount process exited, code=exited, status=1/FAILURE
aug 28 07:19:22 andre-amd systemd[1]: mnt-freenaspool.mount: Failed with result 'exit-code'.
aug 28 07:19:22 andre-amd systemd[1]: Failed to mount /mnt/freenaspool.
If I mount the partition directly in Dolphin by typing in
sftp://freenasuser@192.168.0.15/mnt/freenaspool/freenasdataset/
it asks for my password and I can see the files. What am I doing wrong in the fstab entry?
Offline
AFAIK: Something like this only works if your NAS supports SSH access via public key only. Then you would be able to store the secret key to /root/ssh/... and enable the root user (which is used for fstab mounts) to access/mount the share.
Last edited by -thc (2025-08-28 07:34:40)
Online
but it fails during boot
You lack "noauto"
Otherwise
identityfile=/home/af/.ssh/id_rsa
1. in doubt /home needs to mount before
2. no idea how much of a sticker sshfs is here, but the ssh_config option is "IdentityFile" (CamelCased)
3. "it asks for my password" heavily suggests that PKA isn't available on the host at all?
4. Yous still need the root to have the known_hosts entry
Offline
I looked at the wiki a bit and changed the line in fstab to:
freenasuser@192.168.0.15:/mnt/freenaspool/freenasdataset/ /mnt/freenaspool fuse.sshfs noauto,x-systemd.automount,_netdev,user,idmap=user,follow_symlinks,identityfile=/home/af/.ssh/id_rsa,allow_other,default_permissions,uid=1000,gid=1000 0 0
and jounrnalctl doesn't seem to report anything different:
aug 28 11:24:27 andre-amd systemd[1]: mnt-freenaspool.automount: Got automount request for /mnt/freenaspool, triggered by 1030 (kded6)
aug 28 11:24:27 andre-amd systemd[1]: Mounting /mnt/freenaspool...
aug 28 11:24:27 andre-amd org_kde_powerdevil[1148]: Initializing libddcutil. ddcutil version: 2.2.1, shared library: /usr/lib/libdd
cutil.so.5.3.0
aug 28 11:24:27 andre-amd org_kde_powerdevil[1148]: [ 1148] Options passed from client:
aug 28 11:24:27 andre-amd org_kde_powerdevil[1148]: [ 1148] Applying combined libddcutil options:
aug 28 11:24:27 andre-amd systemd[749]: Started KDE PolicyKit Authentication Agent.
aug 28 11:24:27 andre-amd polkit-kde-authentication-agent-1[1147]: New PolkitAgentListener 0x55770e188d50
aug 28 11:24:27 andre-amd polkit-kde-authentication-agent-1[1147]: Adding new listener PolkitQt1::Agent::Listener(0x55770e1
888d0) for 0x55770e188d50
aug 28 11:24:27 andre-amd polkit-kde-authentication-agent-1[1147]: Listener online
aug 28 11:24:27 andre-amd polkitd[826]: Registered Authentication Agent for unix-session:2 (system bus name :1.40 [/usr/lib/polkit-k
de-authentication-agent-1], object path /org/kde/PolicyKit1/AuthenticationAgent, locale da_DK.UTF-8)
aug 28 11:24:27 andre-amd polkit-kde-authentication-agent-1[1147]: Authentication agent result: true
aug 28 11:24:27 andre-amd systemd[749]: Started Xdg Desktop Portal For KDE.
aug 28 11:24:27 andre-amd kaccess[1145]: X server XKB extension major= 1 minor= 0
aug 28 11:24:27 andre-amd rtkit-daemon[839]: Supervising 6 threads of 3 processes of 1 users.
aug 28 11:24:27 andre-amd rtkit-daemon[839]: Supervising 6 threads of 3 processes of 1 users.
aug 28 11:24:27 andre-amd rtkit-daemon[839]: Supervising 6 threads of 3 processes of 1 users.
aug 28 11:24:27 andre-amd systemd[749]: Started Portal service.
aug 28 11:24:27 andre-amd mount[1205]: read: Connection reset by peer
aug 28 11:24:27 andre-amd systemd[1]: mnt-freenaspool.mount: Mount process exited, code=exited, status=1/FAILURE
aug 28 11:24:27 andre-amd systemd[1]: mnt-freenaspool.mount: Failed with result 'exit-code'.
aug 28 11:24:27 andre-amd systemd[1]: Failed to mount /mnt/freenaspool.
@seth not sure what you mean in your 3rd question? Could you elaborate?
Last edited by fettouhi (2025-08-28 09:37:40)
Offline
If dolphin asks you for a password to access the remote ssh, this does not indicate that authenticating w/ the id_rsa is possible against the NAS at all (atm, kind what _thc hinted at)
I also still don't buy the "identityfile" spelling, also have you sh'd into the NAS as root at least once?
The noauto addition has however worked, the mount is only attempted because kded6 wanted to open the path.
Offline
Just a quick add-on to this, I can mount the partition fine with sshfs via konsole after login if do this:
sshfs freenasuser@192.168.0.15:/mnt/freenaspool/freenasdataset /home/af/test
I just get prompted the password to the remote partition and it mounts.
Offline
I just get prompted the password to the remote partition and it mounts.
Yes, the sshfs manpage points that out.
How do you expect to get asked for a password when the system mounts sth. automatically? Who gets asked? And how?
You, resp. the root user has to be able to ssh into the NAS non-interactively for the fstab approach to work (this is btw. also how you can test the setup)
I also still don't buy the "identityfile" spelling, also have you sh'd into the NAS as root at least once?
Offline
I just get prompted the password to the remote partition and it mounts.
Yes, the sshfs manpage points that out.
How do you expect to get asked for a password when the system mounts sth. automatically? Who gets asked? And how?You, resp. the root user has to be able to ssh into the NAS non-interactively for the fstab approach to work (this is btw. also how you can test the setup)
seth wrote:I also still don't buy the "identityfile" spelling, also have you sh'd into the NAS as root at least once?
Are you talking about the root user on my local machine or the root on the NAS?
Offline
local machine
The root user is relevant because he's who's gonna end up mounting stuff in /etc/fstab (/bin/mount has the SUID bit set) - the dolphin kio fs is a userspace implementation, less like "mount" and more like "ssh"
Offline