Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (server)$ cat << EOF >> .ssh/authorized_keys
- command="rsync",no-pty,no-port-forwarding (paste your public key here)
- EOF
- (server)$ tail -1 .ssh/authorized_keys
- command="rsync",no-pty,no-port-forwarding ssh-rsa AAAAB3..blah..blah..HhcvQ== you@example.com
- rsync -av -e 'ssh -i ~/.ssh/id_rsa_rsync' local/files* server:
- # this entry is used for normal logins to "server":
- Host server
- IdentityFile ~/.ssh/id_rsa
- # this entry is used for rsyncing to "server" without a passphrase:
- Host server-rsync
- Hostname server
- IdentityFile ~/.ssh/id_rsa_rsync
- rsync -av local/files* server-rsync:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement