#apt-get install rsync
# ssh-keygen -t rsa
press ENTER for all questions.
# cd /root/.ssh
# cp id_rsa.pub myserver
send SPC to the remote server:
# scp /root/.ssh/myserver 192.168.1.2:/var/tmp/
send SPC on different port
# scp ‘-P 2848′ /root/.ssh/myserver 192.168.1.2:/var/tmp/
if you receive an error use the following command to clean the old value on the local and online server:
sed -ie 1d ~/.ssh/known_hosts
Edit /etc/ssh/sshd_config
RSAAuthentication yes
PubkeyAuthentication yes
reload ssh server:
# /etc/init.d/ssh reload
open the remote server and change permition:
# cd /var/tmp/
# cat myserver && ~/.ssh/authorized_keys
run test on the local server: # rlogin 192.168.0.1
COPY FILES OVER SERVERS
# rsync -avz 192.168.1.2:/var/scripts/ /var/scripts/
USING DIFFERENT SSH PORT
# rsync -avz –rsh=’ssh -p2848′ 192.168.0.1:/var/scripts/ /var/scripts/
©Web design Costa del Sol | SEO Marbella
