LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 10-16-2011, 11:58 PM   #1
suj
Member
 
Registered: Dec 2009
Posts: 33

Rep: Reputation: 1
Rsync specify SSH port


Can some one help me in understanding rsync. I need to transfer a file from one server to another server, anyway the ssh port on the destination server is different. So how can I specify it in rsync command ?

Thanks in advance
 
Old 10-17-2011, 01:00 AM   #2
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,508

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
Code:
rsync -e "ssh -p <PORT_NUMBER>" etc etc
 
Old 10-17-2011, 01:29 AM   #3
meenakshi.khurana
LQ Newbie
 
Registered: Mar 2010
Location: India
Distribution: Fedora,Redhat
Posts: 19

Rep: Reputation: 5
rsync -v -e "ssh -p 5757" root@192.168.7.21:/opt/test.txt /opt/ --dry-run

where:

-v - verbose
-e - to secify any remote shell you like
--dry-run - will list files that will get copied without actually being copy. This can be used if you’re not yet ready to copy any files or want to verify what all data will get copied using the command.

Once you verified the data, you can actually copy the data by removing --dry-run option from above command.
 
  


Reply

Tags
rsync


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
rsync +ssh on different port? masterross Linux - Software 33 09-22-2014 07:15 PM
rsync->ssh port lackluster Linux - Software 2 05-27-2007 08:42 PM
rsync, SSH server on a different port digen Linux - Server 3 03-09-2007 12:34 AM
rsync using alternative ssh port va1damar Linux - Networking 5 01-29-2007 02:22 PM
rsync and ssh port ohcarol Linux - Software 2 12-22-2004 10:29 AM


All times are GMT -5. The time now is 07:05 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration