Skip to main content

Posts

Showing posts with the label keys

5 most common Rsync command usage examples

rsync is a command for remote sync. It is used to synchronise one location to another in a simple way. Location is meant to be local directory, server or remote web server or whatever accessible by ssh. Advantages of using rsync over other tools is speed and bandwidth requirements. First time rsync copies entire contents of the directory provided and increments changes over next sync times. Command syntax: $ rsync options source destination 1. Synchronising local directories: $ rsync -zvr /tmp/logs/ /tmp/logs1/ building file list ... done created directory /tmp/ logs1 ./ log. log sent 98 bytes received 48 bytes 292.00 bytes/sec total size is 0 speedup is 0.00 $ Used rsync command options here: -z is for compression -v is for verbose output -r is for recursive directory scanning By default rsync does not preserve timestamps.  2. Preserve timestamps and permissions during sync: $ rsync -azvr /tmp/logs/ /tmp/...

install ssh-copy-id on Mac OS X best way

You often need to create identities for unknown/new servers. Then welcome to this article. I believe i have a best practice way of doing it on a MAC system. First of all you need your identity file: 1. Generating ssh keys set You need to use tool that any unix system usually has. It's ssh-keygen. (Skip if you have it already) Last login: Wed Aug 21 16 : 07 : 34 on ttys002 console@username:~$ ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/Users /username/ .ssh/id_rsa): yourkeyname Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in yourkeyname. Your public key has been saved in yourkeyname.pub. The key fingerprint is: XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX. console@username The key 's randomart image is: +--[ RSA 2048]----+ | + | | + | | + | | + ...