rsync issue was working now ask's password on remote yet no password


Recommended Posts

  • Replies 57
  • Created
  • Last Reply

Top Posters In This Topic

oh wow its sharing now  the flash. showing all the files... 

 

when i orginally shared it   i had done it under Shares   and i clicked the flash and exported that way..

so least its showing up  so thats a glitch    so  can i delete that fold  notflash  folder is it safe 

 

as then can move to the next steps

Edited by comet424
Link to comment
52 minutes ago, comet424 said:

so  i since i got the 502 error working agin.. maybe you can help figure why i getting this error why i need a password.. when the remote computer has no password

unraid9.JPG.62ab24e139fc552f586e99d52a79cdb4.JPG

When generating the SSH key are you just hitting the enter key when prompted to enter the password since you do not have a root password on the server?

 

If, when you generated the key you somehow got some character entered as the "password" the login to backup server will be rejected for an invalid password.

 

 I am no SSH expert (there are others in these forums who are), but that it what I guess may be happening.

Edited by Hoopster
Link to comment

ah ok

 

nope my root user i dont use a password

and when i run

ssh-keygen -t rsa -b 2048 -f /root/.ssh/rsync-key

 

i then type yes and hit enter    dont use a password..

and thats ok  some how the go file i used from what you use  gave me the 502 error  i still cant get some of those commands to work either tac  i dont have that file and cron thing just points to a dead website really

 

Link to comment

i tried going cd root wont let me  tried  using Filezilla to see if i could copy tje key file to the backup server   wont let me in the root how you get in there...

and under windows share  i dont see a root folder  to just copy the pub file from it to backupserver  since i cant get passed this error above

 

Link to comment
2 hours ago, comet424 said:

i tried going cd root wont let me  tried  using Filezilla to see if i could copy tje key file to the backup server   wont let me in the root how you get in there...

and under windows share  i dont see a root folder  to just copy the pub file from it to backupserver  since i cant get passed this error above

 

cd root - go to a folder called 'root' that is a sub folder of whatever folder you happen to be in.

cd /root (just 'cd /' is sufficient - go back to the root (very top level of the filesystem) regardless of the folder in which you are currently working

 

When you start a terminal session from the unRAID GUI you are already at the root.  When working from the command line you are working with the unRAID filesystem in RAM.  This has nothing to do with the flash drive contents unless you navigate to the flash drive directory.

 

If you want to look at the contents of the flash drive from the command line do a 'cd /boot' 

 

448517933_Root2text.png.df22fbaf17df098d053c2f703f334d54.png

 

In Windows you are working with the contents of the flash drive (or other exported SMB user shares).  You will NEVER see anything called 'root' when looking at the flash drive or any other shares. When you open the 'flash' folder in Windows, you are at the root of the flash drive, but, there is nothing called root.

 

Since the unRAID OS and its filesystem only exist in RAM, on a reboot, anything you did in the filesystem is lost.

 

When it comes to the SSH keys, authorized_keys and known_host files that get generated, they are all lost unless you do something to preserve them.  This is why you make the necessary entries in the go file.  The files are preserved on the flash drive and copied to the unRAID filessytem on each reboot.  Here are the relevant entries in my go file for the source server  (you need similar entries on the destination server as well - I have already provided you a copy of both):

 

# Copy SSH files back to /root/.ssh folder and set permissions for files
mkdir -p /root/.ssh
cp /boot/config/ssh/medianas_key /root/.ssh/id_rsa
cp /boot/config/ssh/known_hosts /root/.ssh/known_hosts
cat /boot/config/ssh/backupnas_key.pub > /root/.ssh/authorized_keys
chmod g-rwx,o-rwx -R /root/.ssh

 

1. mkdir -p /root/.ssh    --- recreate the .ssh directory in the root of the unRAID filesystem in RAM

2. cp /boot/config/ssh/medianas_key /root/.ssh/id_rsa   --- copy the file /boot/config/ssh/medianad_key to a file named id_rsa in /root/.ssh  

(id_rsa is the default key name ssh looks for)

3. cp /boot/config/ssh/known_hosts /root/.ssh/known_hosts   --- copy known_host from the flash drive to the filesystem in RAM

4. cat /boot/config/ssh/backupnas_key.pub > /root/.ssh/authorized_keys  --- output the bakcupnas public key to authorized_key in the unRAID filesystem in RAM

(authorized keys contains information about which devices are allowed to connect via SSH to the remote host)

5.  chmod g-rwx,o-rwx -R /root/.ssh   ---set the necessary permission on everthing in the .ssh directory in the root of the unRAID filesystem in RAM

 

You MUST get the authorized_keys, xxxxxxx_key (whatever you called your generated SSH key file) and known_hosts file properly generated, stored on the flash drive and copied to RAM on reboot, or this will never work for you.  It appears that this step is where you are having the problem.

 

 

 

 

Edited by Hoopster
Link to comment

is there a way to make unriad not case senstive.. this stuff is crazy 

and reason i seen root   if you load up filezilla i had seen before the folder name root  in the main directory.. this is why everything confuses me  still new to unraid.. was using freenas before unraid

 

ok i see the one mistake i used your  medianas_key  and i followed other instructions  tower-rsync-key   this stuff confuses me 

but can you go to the steps before go file  is this all correct

 

Tower

---------------

ssh-keygen -t rsa -b 2048 -f /root/.ssh/TowerKey 
scp /root/.ssh/TowerKey.pub root@backupserver:/root/

scp /root/.ssh/TowerKey.pub root@Mitchtower:/root/

 

 

backup computer

-------------------------------

mkdir .ssh

chmod 700 .ssh

mv TowerKey.pub .ssh/

cd .ssh/

chmod 600 authorized_keys

cat Tower-rsync-key.pub >> authorized_keys

cd ..

chmod 700 .ssh/

chmod 600 .ssh/TowerKey.pub

chmod 644 .ssh/authorized_keys

 

Tower

----------

rsync -avz -e "ssh -i /root/.ssh/TowerKey" /boot/config/ root@MitchTower:/boot/fromTower/

rsync -avz -e "ssh -i /root/.ssh/TowerKey" /boot/config/ root@Backupserver:/boot/fromTower/

 

as i have a mitchtower my sisters unraid.. then i have my own backupserver  and tower  and i wanna be able to send files to the mitchtower and mitchtower send files to Tower  or id pull it...

 

but are those the steps before the go files  as i trying to re read other article and incorportate things

 

 

my go file for the tower  but i dont have the plex in there now i guess i need to add it

#?Setup drivers for hardware decoding in Plex
modprobe i915
chown -R nobody:users /dev/dri
chmod -R 777 /dev/dri

# Copy SSH files back to /root/.ssh folder and set permissions for files
mkdir -p /root/.ssh
cp /boot/config/ssh/TowerKey /root/.ssh/id_rsa
cp /boot/config/ssh/known_hosts /root/.ssh/known_hosts
cat /boot/config/ssh/TowerKey.pub > /root/.ssh/authorized_keys
chmod g-rwx,o-rwx -R /root/.ssh

#!/bin/bash
# Start the Management Utility
/usr/local/sbin/emhttp &

 

 

and now the backupserver go file

#Setup drivers for hardware decoding in Plex
modprobe i915
chown -R nobody:users /dev/dri
chmod -R 777 /dev/dri

# Copy SSH files back to /root/.ssh folder and set permissions for files
mkdir -p /root/.ssh
cp /boot/config/ssh/TowerKey /root/.ssh/id_rsa
cat /boot/config/ssh/TowerKey.pub > /root/.ssh/authorized_keys
chmod g-rwx,o-rwx -R /root/.ssh

#!/bin/bash
# Start the Management Utility
/usr/local/sbin/emhttp &

 

 

and not the Mitchserver go file

#?Setup drivers for hardware decoding in Plex
modprobe i915
chown -R nobody:users /dev/dri
chmod -R 777 /dev/dri

# Copy SSH files back to /root/.ssh folder and set permissions for files
mkdir -p /root/.ssh
cp /boot/config/ssh/TowerKey /root/.ssh/id_rsa
cp /boot/config/ssh/known_hosts /root/.ssh/known_hosts
cat /boot/config/ssh/TowerKey.pub > /root/.ssh/authorized_keys
chmod g-rwx,o-rwx -R /root/.ssh

#!/bin/bash
# Start the Management Utility
/usr/local/sbin/emhttp &

 

Link to comment
50 minutes ago, comet424 said:

is there a way to make unriad not case senstive.. this stuff is crazy 

No.  All Unix/Linux systems are case sensitive; always have been, always will be.  Windows is not case sensitive, but, Linux is.

 

52 minutes ago, comet424 said:

#Setup drivers for hardware decoding in Plex
modprobe i915
chown -R nobody:users /dev/dri
chmod -R 777 /dev/dri

None of this needs to be in your go file unless you have a CPU with support for Intel Quick Sync Video, are running a Plex server on your unRAID box and want to do hardware transcoding of media files.  It has NOTHING to do with SSH and rsync!

 

I'll look at the rest later.

Link to comment

oh i have no idea if my cpu supports quick sync video not sure what that is.. ya i running plex  i set it for hardware transcoding in the plex settings

 

ya i noticed its space sensitivie too   ugh    so if i had a space after  towerkey   it be  towerkey .pub   not towerkey.pub

but i made sure no spaces  and ran above  and rebooted and still  problems  cant solve the password issue on the mitchserver gonna reformat that one i guess no one has answer 

 

but here you see the error still and i ran it in the order i posted aboveunraid12.JPG.73061aba57817b5a87460484887e67b7.JPG

 

Link to comment
15 hours ago, Hoopster said:

cd /root (just 'cd /' is sufficient - go back to the root (very top level of the filesystem) regardless of the folder in which you are currently working

NO! /root and / are totally different directories. / is the root of the file system. /root is the home directory of the 'root' user. When you log into Unraid you are user 'root' and in your own home drectory (i.e. /root, not /).

Link to comment
13 hours ago, comet424 said:

i noticed its space sensitivie too   ugh    so if i had a space after  towerkey   it be  towerkey .pub   not towerkey.pub

Computers are much less forgiving of sloppy typing than humans. Remember, though they can do simple repetitive tasks very quickly, they are actually really stupid.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.