hcitool scan
sudo hidd --connect XX:XX:XX:XX:XX:XX
hcitool scan
sudo hidd --connect XX:XX:XX:XX:XX:XX
Enviado por El Salvador Rudas | 0 Comentario (s)
Enviado por El Salvador Rudas | 0 Comentario (s)
Enviado por El Salvador Rudas | 0 Comentario (s)
ssh-keygen -t dsa
(press enter twice to give a blank password)
cd
vi .ssh/.config
Press "i" to enter insert mode and copy this into the file:
Host remotehost
User remoteuser
Compression yes
Protocol 2
RSAAuthentication yes
StrictHostKeyChecking no
ForwardAgent yes
ForwardX11 yes
IdentityFile /home/localuser/.ssh/id_remotehost_dsa
Do NOT change the last line - it is supposed to say remotehost (not an actual host name). Now,
:wq
(save and exit vi)
chmod 700 .ssh
vi .ssh/id_dsa.pub
It should look like this:
ssh-dss AAAA..............v root@HOSTNAMEOFSRV01
where there is lots of random letters/numbers where the dots are. Select it all and copy it. Make sure that it is all on one line with no spaces at the start or finish (which will happen if you copy it using putty on windows; test it by pasting it into notepad)
Tip: To copy from putty on windows select the text from within vi and pres Ctrl + Shift. To paste text enter insert mode and press the right mouse button.
cd
vi .ssh/authorized_keys
Enter insert mode (press i) and paste the key, again ensuring that there are no spare newlines or spaces. Save the file and exit vi (press :wq then return, as above). Now you just need to set some permissions otherwise SSH will ignore the files you just created:
chmod 700 .ssh
chmod 644 .ssh/authorized_keys
On the first server, type
ssh srv02
where srv02 = the hostname of the second server. It could be an IP address too.
If it just logs you in (no passwords), then you are done. If not double check the above and start google searching your errors or email me and I will try to help. The next bit will certainly fail if you can't make an SSH connection.
You have two options for replication: Unison and Rsync.
Skip to the Unison section if you want two-way replication
Rsync is normally installed so I will not go through installing it. To make the rsync connection run the following command on srv01:
rsync -e ssh -avz --delete /home/folder1/ srv02hostname:/home/folder2
again, where srv02 is the hostname or IP of srv02. This will make /home/folder2 on srv02 (the second server) identical to /home/folder1 (be aware that this will delete all files in /home/folder2 on srv02 that are not in /home/folder1 on srv01!)
You can put as many of these as you line in the crontab (crontab -e). You now have rsync set up: congratulations.
Enviado por El Salvador Rudas | 0 Comentario (s)
Enviado por El Salvador Rudas | 0 Comentario (s)
Enviado por El Salvador Rudas | 0 Comentario (s)