NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
wagb4
Sep 11, 2014Aspirant
SSH Connect to NAS
Using a ReadyNAS model 102 with firmware version 6.1.8.
I enabled SSH service but cannot mount a share using "sshfs". Has anyone been able to mount a share using SSH, and if so how do you do it?
I have tried variations on this theme:
Using a regular user and the admin user, both give the same results - "remote host has disconnected". User jim is the owner of FileSync Share on the NAS. I tried with and without the Volume name (data) as well as with no optoins on the sshfs command.
I don't see anywhere that SSH gets enabled for a specific share, like the other protocols (SMB, NFS, etc). Am I correct that in System > Settings > Support is only for "Remote" (as in ReadyCloud or ReadyNAS Remote) usage and it stays disabled for normal LAN access? I even tried enabliing that setting, but did not work so I disabled that setting.
I enabled SSH service but cannot mount a share using "sshfs". Has anyone been able to mount a share using SSH, and if so how do you do it?
I have tried variations on this theme:
jim@WS-2 ~ $ sshfs -o nonempty jim@192.168.xxx.xxx:/FileSync /tmp/nas
jim@192.168.xxx.xxx's password:
remote host has disconnected
Using a regular user and the admin user, both give the same results - "remote host has disconnected". User jim is the owner of FileSync Share on the NAS. I tried with and without the Volume name (data) as well as with no optoins on the sshfs command.
I don't see anywhere that SSH gets enabled for a specific share, like the other protocols (SMB, NFS, etc). Am I correct that in System > Settings > Support is only for "Remote" (as in ReadyCloud or ReadyNAS Remote) usage and it stays disabled for normal LAN access? I even tried enabliing that setting, but did not work so I disabled that setting.
14 Replies
Replies have been turned off for this discussion
- mdgm-ntgrNETGEAR Employee RetiredSSH is enabled for the root user (has same password as the admin user). However if you use this you will likely run into permissions issues when trying to use the files via other protocols.
The setting under Support is for Remote access by support only. - StephenBGuru - Experienced UserSSH is not a file access protocol, so it makes no sense to enable it on a share by share basis.
The NAS supports FTPS, but not SFTP. Since SSHFS is using SFTP underneath, it's not compatible. You can use NFS to mount the RN102 shares on another linux machine. - wagb4AspirantThanks Guys.
What I want to do is mount a NAS Share on a LAN connected Linux computer so I can use a File & Directory sync application (such as DirSyncPro or FreeFileSync) to mirror some directories' contents to the NAS. Any suggestions are welcome. Both of those sync applications seem to want a remote device mounted using SSHFS and then use the local mount point as the destination of the sync operation. - xeltrosApprenticeI think any protocol would do. smb is seen as local via linux so if you have a sync software it should work like if it was an usb key.
Rsync is my personal preference for sync. An Rsync backup (over SSH if needed) could be an idea. - wagb4AspirantI have been looking into Rsync and belive that is what I want to use, I think terminology is confusing me.
I have experimented with rsync on a Linux desktop computer (one directory on the computer to another directory on the same computer) and am happy with how rsync works. Trying to repeat those experiments from the computer to the NAS is confusing me. I think my first problem is to overcome is that I need a local (on the computer) mount so that rsync has a local mount point to work with. What protocol should I use to mount the NAS share, SMB/CIFS, NFS, or what? From what I have deduced I think I need to use SSH to connect to the NAS for Rsync; am I wrong?
I think I want to initiate Rsync actions from the computer manually, but I guess I could configure NAS Backup jobs to perform the backup/sync actions. All I want to do is use Rsync to backup some directories on Linux desktop computers to the Backup share on the NAS.
What have others done to get this working?
Thanks - xeltrosApprenticeyou should be able to sync to an rsync server (the NAS has one in the settings on OS6) by using the user@IP:/folder pattern to connect in clear text. Of course if you want to user rsync over SSH this should be possible too, but I think you will have to enable the SSH server on the remote server.
Otherwise any mount should do fine and local rsync command will do the job afterwards. - wagb4AspirantI tried rsync and I think it is asking for the name of the daemon in the NAS path. How do I get the NAS to tell me what is the name of the daemon? This is what I did and what it returns:
rsync -h --progress --stats -r -tgo -p -l -D --update --delete-after --password-file=/home/jim/bin/rsyncpw /home/jim/TestFiles rsyncjim@192.168.0.215:/Backup/TestFiles/
The --password-file option may only be used when accessing an rsync daemon.
rsync error: syntax or usage error (code 1) at main.c(1269) [sender=3.0.9]
The Backup share on the NAS is enabled for Rsync, the NAS knows of the Rsync user named rsyncjim
Trying the same rsync command after removing the --password phrase gives a warning message about ECDSA key and that I should add a key to a ssh known_hosts file. If I am not using SSH why is that error croping up? - wagb4AspirantI believe I solved the rsync command's initial connection issue by removing the offending entry in the computer's ./ssh/known_hosts file. Then connecting (rsync) saved the new fingerprint in the known_hosts file; but the connection closed. Then trying the rsync again, that time it asked for the password, but won't accept the password established.
rsync -h --progress --stats -r -tgo -p -l -D --update --delete-after /home/jim/TestFiles rsyncjim@192.168.0.215:/Backup/TestFiles/
The authenticity of host '192.168.0.215 (192.168.0.215)' can't be established.
ECDSA key fingerprint is 7c:d0:00:d3:8f:8d:ee:e9:6b:99:cd:b3:09:c6:bf:f9.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.0.215' (ECDSA) to the list of known hosts.
Connection closed by 192.168.0.215
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(605) [sender=3.0.9]
rsync -h --progress --stats -r -tgo -p -l -D --update --delete-after /home/jim/TestFiles rsyncjim@192.168.0.215:/Backup/TestFiles/
rsyncjim@192.168.0.215's password:
Permission denied, please try again.
rsyncjim@192.168.0.215's password:
Permission denied, please try again.
rsyncjim@192.168.0.215's password:
Permission denied (publickey,password).
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(605) [sender=3.0.9]
I know the password I am using is correct. SSH service is enabled on the NAS. I even disabled that to see what the impact is on the rsync command and it fails right away, so I turned SSH back On.
Do I need to add some entry to the computer's id_rsa.pub file, or some other SSH-related file on the computer for the NAS rsync user? if so, how? - xeltrosApprenticeIs your user allowed to connect via SSH ? By default the NAS only allows root to connect.
- wagb4AspirantI don't know, how would I find out?
I don't think I want to do rsync backups as user root. I want file ownership & permissions retained for the backup (rsync) files.
The user I created "rsyncjim" was done because I read somewhere that rsync on the NAS wants a unique user just for rsync, not a normal user with a home folder on the NAS. So I established that user when configuring rsync for the NAS's Backup share in Network Access Tab.
I don't think I really need SSH for rsync backups. I just want to be able to use rsync over my LAN to/from the NAS. I cannot get rsync commands initiated from Linux computer to work or NAS Backup jobs using rsync to work.
Related Content
NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!