web analytics

Blog

Rsync on servers with custom SSH port

Tags: rsyncrsync over sshssh

Published on: September 22, 2014 by Karthikeyan B.

Rsync on servers with custom SSH port

Scenario:

My requirement was to rsync /etc/yum.repos.d/ with another server running the SSH on port 1791. Normal rsync won’t work and we need to specify the rsync custom ssh port in the rsync command itself. The command I had to execute is below

Rsync over custom SSH port


rsync -av -e 'ssh -p 1791' /etc/yum.repos.d/ xx.xx.xx.xx:/etc/yum.repos.d

 

Rsync using SSH key:


rsync -avz -e "ssh -i /path/to/private/key" username@hostname or IP path/to/remote/files/ /local/files/

 

rsync using SSH key & Custom port


rsync -avz -e "ssh -i /path/to/private/key -p 1791" username@hostname or IP path/to/remote/files/ /local/files/

 

Category : Howtos, Linux

Karthikeyan B.

Karthikeyan B.

Karthi always loves to tread through less traveled paths. His desire to decipher complex technologies and pursuit for excellence makes this otherwise jovial guy to a tough brain to crack when it comes to technology. He got great intrest in environmental issues and advocates for sustainable, inclusive, development patterns and projects.

You may also read:

Comments

Add new commentSIGN IN

Let's Connect

Get new updates

Categories

$0.000 items