removed /home from path
This commit is contained in:
@@ -12,28 +12,28 @@ wget -q http://192.168.1.50/scripts/restic/restic-sftp/restic-sftp-init.sh
|
|||||||
mv /root/restic-sftp-* /root/scripts/restic
|
mv /root/restic-sftp-* /root/scripts/restic
|
||||||
chmod +x /root/scripts/restic/*
|
chmod +x /root/scripts/restic/*
|
||||||
|
|
||||||
isInFile=$(cat /home/root/.ssh/config | grep -c "truenas")
|
isInFile=$(cat /root/.ssh/config | grep -c "truenas")
|
||||||
if [ $isInFile -eq 0 ]
|
if [ $isInFile -eq 0 ]
|
||||||
then
|
then
|
||||||
echo "" >> /home/root/.ssh/config
|
echo "" >> /root/.ssh/config
|
||||||
echo "Host truenas" >> /home/root/.ssh/config
|
echo "Host truenas" >> /root/.ssh/config
|
||||||
echo "Hostname 192.168.1.41" >> /home/root/.ssh/config
|
echo "Hostname 192.168.1.41" >> /root/.ssh/config
|
||||||
echo "Port 22" >> /home/root/.ssh/config
|
echo "Port 22" >> /root/.ssh/config
|
||||||
echo "User akanealw" >> /home/root/.ssh/config
|
echo "User akanealw" >> /root/.ssh/config
|
||||||
echo "IdentityFile ~/.ssh/truenas" >> /home/root/.ssh/config
|
echo "IdentityFile ~/.ssh/truenas" >> /root/.ssh/config
|
||||||
echo "StrictHostKeyChecking no" >> /home/root/.ssh/config
|
echo "StrictHostKeyChecking no" >> /root/.ssh/config
|
||||||
chmod 600 /home/root/.ssh/config
|
chmod 600 /root/.ssh/config
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -f /home/root/.ssh/truenas ]]
|
if [[ ! -f /root/.ssh/truenas ]]
|
||||||
then
|
then
|
||||||
echo "-----BEGIN OPENSSH PRIVATE KEY-----" > /home/root/.ssh/truenas
|
echo "-----BEGIN OPENSSH PRIVATE KEY-----" > /root/.ssh/truenas
|
||||||
echo "b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW" >> /home/root/.ssh/truenas
|
echo "b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW" >> /root/.ssh/truenas
|
||||||
echo "QyNTUxOQAAACCDKl0DNjKWKlSpbCGeKjmA3tc0pKDvAiMfWQ83h0JVlQAAAJhNQ67sTUOu" >> /home/root/.ssh/truenas
|
echo "QyNTUxOQAAACCDKl0DNjKWKlSpbCGeKjmA3tc0pKDvAiMfWQ83h0JVlQAAAJhNQ67sTUOu" >> /root/.ssh/truenas
|
||||||
echo "7AAAAAtzc2gtZWQyNTUxOQAAACCDKl0DNjKWKlSpbCGeKjmA3tc0pKDvAiMfWQ83h0JVlQ" >> /home/root/.ssh/truenas
|
echo "7AAAAAtzc2gtZWQyNTUxOQAAACCDKl0DNjKWKlSpbCGeKjmA3tc0pKDvAiMfWQ83h0JVlQ" >> /root/.ssh/truenas
|
||||||
echo "AAAEBoM2bsFqToHCHKO3F6MvOlObGaiNXw6UPcyBlyfbSAvYMqXQM2MpYqVKlsIZ4qOYDe" >> /home/root/.ssh/truenas
|
echo "AAAEBoM2bsFqToHCHKO3F6MvOlObGaiNXw6UPcyBlyfbSAvYMqXQM2MpYqVKlsIZ4qOYDe" >> /root/.ssh/truenas
|
||||||
echo "1zSkoO8CIx9ZDzeHQlWVAAAAEWFrYW5lYWx3QExhcHRvcFBDAQIDBA==" >> /home/root/.ssh/truenas
|
echo "1zSkoO8CIx9ZDzeHQlWVAAAAEWFrYW5lYWx3QExhcHRvcFBDAQIDBA==" >> /root/.ssh/truenas
|
||||||
echo "-----END OPENSSH PRIVATE KEY-----" >> /home/root/.ssh/truenas
|
echo "-----END OPENSSH PRIVATE KEY-----" >> /root/.ssh/truenas
|
||||||
chown root:root /home/root/.ssh/truenas
|
chown root:root /root/.ssh/truenas
|
||||||
chmod 600 /home/root/.ssh/truenas
|
chmod 600 /root/.ssh/truenas
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user