SSH from serve to F2-210

IPv4/6, Port, VPN, proxy, SSH, remote access and more.
Locked
kefnsofl
Posts: 9
Joined: 24 Feb 2020, 03:19

SSH from serve to F2-210

Post by kefnsofl »

Greetings,

I have a serve that I would like to SSH files from that server to the NAS using RSYNC. Each time I am prompted from NAS for a password. On my server I have generated a key (its a Linux server) but I am having a problem installing it on the NAS (F2-210). I need to install this key so that when the RSYNC command runs it does not prompt me for a password. Does anyone have any suggestions?

Best Regards,
Keith
User avatar
TMSupport
TerraMaster Team
Posts: 2314
Joined: 13 Dec 2019, 15:15

Re: SSH from serve to F2-210

Post by TMSupport »

Please see the following steps:
Linux Server:
[root@Linux Server ~]# ssh-keygen -t rsa
#Press ENTER three times
[root@Linux Server ~]# ssh root@NASip -p 9222 "mkdir .ssh"
#Input password
[root@Linux Server ~]# scp -P 9222 ~/.ssh/id_rsa.pub root@NASip:.ssh/id_rsa.pub
#Input password

NAS:
root@NAS:~# touch /root/.ssh/authorized_keys
root@NAS:~# cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys

Linux Server:
[root@Linux Server ~]# ssh root@NASip -p 9222
#Login without password
To contact our team, please send email to following addresses, remember to replace (at) with @
Technical team: support(at)terra-master.com (for technical support)
Service team: service(at)terra-master.com (for purchasing, return, replacement, RMA service)
User avatar
TMroy
TerraMaster Team
Posts: 2598
Joined: 10 Mar 2020, 14:04
China

Re: SSH from serve to F2-210

Post by TMroy »

kefnsofl wrote: 24 Feb 2020, 03:26 Greetings,

I have a serve that I would like to SSH files from that server to the NAS using RSYNC. Each time I am prompted from NAS for a password. On my server I have generated a key (its a Linux server) but I am having a problem installing it on the NAS (F2-210). I need to install this key so that when the RSYNC command runs it does not prompt me for a password. Does anyone have any suggestions?

Best Regards,
Keith
Or, you may need to enable the Rsync service on TOS > control panel> networking > file service > Rsync server.
after you set a username and password on the settings, then you will not be prompted for a password anymore.
To contact our team, please send email to following addresses, remember to replace (at) with @:
Support team: support(at)terra-master.com (for technical support only)
Service team: service(at)terra-master.com (for purchasing, return, replacement, RMA service)
User avatar
nullren
Posts: 5
Joined: 29 Nov 2020, 07:57

Re: SSH from serve to F2-210

Post by nullren »

i posted this in another thread and it might be useful here, too.
nullren wrote: 29 Nov 2020, 12:27 i was unable to use my ssh key and it was annoying. logging in using ssh with the verbose flag (-v) helped me figure out where the problem was. down towards the bottom was this to helped me figure out my situation.

Code: Select all

debug1: Remote: Ignored authorized keys: bad ownership or modes for directory /mnt/md0/User/myuser/home
looking at it, the permissions were 777.

Code: Select all

[myuser@TNAS-xxxxxx ~]$ ls -ld .
drwxrwxrwx 1 myuser root 8 Nov 28 15:23 .
ssh doesn't like when your homedir, ssh config dir, or authorized_keys files are too permissive. i fixed this by chmod 755 my homedir.

Code: Select all

chmod 755 ~
Locked