This commit is contained in:
陆柯 2019-12-14 11:17:11 +08:00
parent cab00d1a94
commit e0f90ab6b4
4 changed files with 35 additions and 1 deletions

View File

@ -0,0 +1,10 @@
if [ $1 ]
then
REMOTEHOST=$1
else
read -p "Enter user@remotehost " REMOTEHOST
fi
scp ~/.ssh/id_rsa.pub $REMOTEHOST:~/tmp.pub
ssh $REMOTEHOST "mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat ~/tmp.pub >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys && rm -f ~/tmp.pub"

View File

@ -1,5 +1,13 @@
#!/bin/bash
if [ $1 ]
then
FONPATH=$1
else
read -p "Enter path-to-faronear " FONPATH
fi
pushd $FONPATH
for org in `ls .`
do
if [ -d $org ]
@ -18,3 +26,4 @@ do
cd ..;
fi
done
popd

View File

@ -1 +1,15 @@
rsync -rvz -e ssh -p 22000 --progress ./git.repo adot@west-cn.yuanjin.net:/home/adot/
if [ $1 ]
then
LOCALPATH=$1
else
read -p "Enter localpath " LOCALPATH
fi
if [ $2 ]
then
REMOTEPATH=$2
else
read -p "Enter user@remotehost:path " REMOTEPATH
fi
echo rsync -rvz -e ssh -p 22000 --progress $LOCALPATH $REMOTEHOST

View File

@ -44,6 +44,7 @@ useradd $User
passwd $User
mkdir /home/$User
chown $User:$User /home/$User
chmod 700 /home/$User
# emacs /etc/passwd
# Debian 10 default to /bin/sh
sed -i "s/\/home\/$User:\/bin\/sh$/\/home\/$User:\/bin\/bash/g" /etc/passwd