Tips and tricks

From DWIKI
Revision as of 12:24, 25 August 2016 by Tony (talk | contribs) (Created page with "=Clone disk over ssh= On remotehost: *have a user 'someuser' you can ssh to with key, so without password. add a line "someuser ALL=(ALL) NOPASSWD: /bin/dd Then you can run...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Clone disk over ssh

On remotehost:

  • have a user 'someuser' you can ssh to with key, so without password.

add a line "someuser ALL=(ALL) NOPASSWD: /bin/dd

Then you can run

ssh -t someuser@remotehost "dd if=/dev/sdXX" | dd of=/dev/sdXY


Note the "-t" which is required, otherwise you get "sudo: no tty present and no askpass program specified"