Added ssh alias with variables (conf)
This commit is contained in:
parent
b1d0c7df11
commit
9550c6be38
15
clone/clone
15
clone/clone
|
@ -213,6 +213,13 @@ step7(){
|
||||||
echo " (.) Emulate \`systemctl enable ssh.service\`";
|
echo " (.) Emulate \`systemctl enable ssh.service\`";
|
||||||
sudo ln -fs /lib/systemd/system/ssh.service /mnt/etc/systemd/system/ssh.service;
|
sudo ln -fs /lib/systemd/system/ssh.service /mnt/etc/systemd/system/ssh.service;
|
||||||
|
|
||||||
|
# (9) Define config alias with ssh-key #
|
||||||
|
echo " (.) Define alias config";
|
||||||
|
echo "Host\tsmmp-server\n\tHostname\t$SERVER_HOSTNAME\n\tUser\t$SERVER_USERNAME\n\tIdentityFile\t~/.ssh/id_ecdsa\n" | sudo tee /mnt/home/sats/.ssh/config > /dev/null;
|
||||||
|
sudo chown 666:666 /mnt/home/sats/.ssh/config;
|
||||||
|
sudo chmod 444 /mnt/home/sats/.ssh/config;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
echo "<<< done";
|
echo "<<< done";
|
||||||
|
|
||||||
|
@ -265,18 +272,18 @@ step10(){
|
||||||
|
|
||||||
echo "\n>>> [10] Set up SATS daemon";
|
echo "\n>>> [10] Set up SATS daemon";
|
||||||
|
|
||||||
|
|
||||||
# (1) Create daemon folder #
|
# (1) Create daemon folder #
|
||||||
echo " (.) Create daemon folder";
|
echo " (.) Create daemon folder";
|
||||||
sudo mkdir -p /home/sats/satsd;
|
sudo mkdir -p /mnt/home/sats/satsd;
|
||||||
|
|
||||||
# (2) Init git repository with ssh url #
|
# (2) Init git repository with ssh url #
|
||||||
echo " (.) Clone git repo with server's ssh url";
|
echo " (.) Clone git repo with server's ssh url";
|
||||||
sudo git clone --depth=1 ssh://gw@xdrm.io/home/gw/satsd /home/sats/satsd;
|
sudo git clone --depth=1 ssh://smmp-server/home/gw/satsd /mnt/home/sats/satsd;
|
||||||
|
|
||||||
# (3) Set up git pull with good key #
|
# (3) Set up git pull with good key #
|
||||||
echo " (.) Set up \`git pull\` with registered ssh key";
|
echo " (.) Set up \`git pull\` with registered ssh key";
|
||||||
git pull origin master;
|
cd /mnt/home/sats/git pull origin master;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
echo "<<< done";
|
echo "<<< done";
|
||||||
|
|
|
@ -2,3 +2,7 @@
|
||||||
# WIFI SETTINGS
|
# WIFI SETTINGS
|
||||||
export WIFI_SSID="freeboxma";
|
export WIFI_SSID="freeboxma";
|
||||||
export WIFI_PASS=" manon adrien ";
|
export WIFI_PASS=" manon adrien ";
|
||||||
|
|
||||||
|
# SERVER SETTINGS
|
||||||
|
export SERVER_HOSTNAME="xdrm.io";
|
||||||
|
export SERVER_USERNAME="gw";
|
||||||
|
|
Loading…
Reference in New Issue