LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   rsync +ssh on different port? (https://www.linuxquestions.org/questions/linux-software-2/rsync-ssh-on-different-port-448112/)

masterross 05-24-2006 10:44 AM

rsync +ssh on different port?
 
hi,

i want to connect via rsync to remote machine with ssh running on different port

can u assist me?

thanks,
Ross

macemoneta 05-24-2006 11:29 AM

The syntax you want is, for example:

rsync -av --progress --inplace --rsh='ssh -p8023' somefile user@host:somedir/

In the example above, rsync will use ssh on port 8023.

masterross 05-24-2006 12:26 PM

thank u macemoneta,

that is what i need :)

downhillgames 12-09-2008 02:07 PM

Quote:

Originally Posted by masterross (Post 2260712)
thank u macemoneta,

that is what i need :)

Me, too. Thanks dude (2 years late, but hey, better late than never! :p)

ppro 01-04-2011 01:31 PM

Quote:

Originally Posted by downhillgames (Post 3369491)
Me, too. Thanks dude (2 years late, but hey, better late than never! :p)

Me, too. Thanks dude (2 years late, but hey, better late than never! :p

heheheh

felipelalli 01-13-2011 10:43 AM

Quote:

Originally Posted by ppro (Post 4213013)
Me, too. Thanks dude (2 years late, but hey, better late than never! :p

heheheh

Me, too. Thanks dude (2 years late + 2 days, but hey, better late than never! :p

Brazen 03-01-2011 01:12 PM

Quote:

Originally Posted by felipelalli (Post 4223112)
Me, too. Thanks dude (2 years late + 2 days, but hey, better late than never! :p

Me, too. Thanks dude (4 years late + 282 days, but hey, better late than never! :p)

Reuti 03-01-2011 01:40 PM

It can even be shortcut when you have a ~/.ssh/config:
Code:

Host foobar
    Port 8023
    User the_user_example
    Hostname the.host.example

and issue:
Code:

rsync -av --progress --inplace --rsh=ssh somefile foobar:somedir
Although the thread is old, the usage and technics still apply.

mtl 06-30-2011 12:50 PM

Quote:

Originally Posted by Reuti (Post 4275496)
It can even be shortcut when you have a ~/.ssh/config:
Code:

Host foobar
    Port 8023
    User the_user_example
    Hostname the.host.example

and issue:
Code:

rsync -av --progress --inplace --rsh=ssh somefile foobar:somedir

Thanks for the tip, 5+ years in the future! :)

ajorpheus 08-09-2011 01:23 PM

Ahh .. still works ..
 
The command above with the 'rsh' option still works for me .. Yayyy !!!

shashank86 12-02-2011 06:51 AM

Quote:

Originally Posted by macemoneta (Post 2260607)
The syntax you want is, for example:

rsync -av --progress --inplace --rsh='ssh -p8023' somefile user@host:somedir/

In the example above, rsync will use ssh on port 8023.

Thank You. From 2011!

diegors 02-16-2012 07:02 PM

Quote:

Originally Posted by macemoneta (Post 2260607)
The syntax you want is, for example:

rsync -av --progress --inplace --rsh='ssh -p8023' somefile user@host:somedir/

In the example above, rsync will use ssh on port 8023.

Me, too. Thanks dude (5.73 years late, but hey, better late than never! )
Quote:

Originally Posted by Reuti
It can even be shortcut when you have a ~/.ssh/config:
Code:
Host foobar
Port 8023
User the_user_example
Hostname the.host.example
and issue:
Code:
rsync -av --progress --inplace --rsh=ssh somefile foobar:somedir
Although the thread is old, the usage and technics still apply.

Me, too. Thanks dude (1.12 years late, but hey, better late than never! )


:)

Edit: I just subscribe to say: Thanks =)

randomdude 04-27-2012 02:37 PM

Quote:

Originally Posted by macemoneta (Post 2260607)
rsync -av --progress --inplace --rsh='ssh -p8023' somefile user@host:somedir/

Let me register here just to thank you from the future, as the other people here.

mickza 05-01-2012 05:15 AM

Quote:

Originally Posted by macemoneta (Post 2260607)
The syntax you want is, for example:

rsync -av --progress --inplace --rsh='ssh -p8023' somefile user@host:somedir/

In the example above, rsync will use ssh on port 8023.

Many thanks - now I can backup my IPCop Update Accelerator cache, damned if I could figure this out from the rsync man page.

Spatik 06-05-2012 04:39 AM

Nice
 
Thanks dude....;)

SpawnOfSatan 07-03-2012 05:23 AM

Ok so this is the norm here, so I posting to say thanks for the tip, it is still working in 2012 :)

Thank you from the future !!!

wzyboy 07-09-2012 03:08 AM

Thanks. I am from six years later.

rickumali 08-27-2012 07:42 AM

The response from macemoneta (#2) helped me too. Thank you!

luc2 10-18-2012 04:33 AM

thanks from 2012

danky78 12-19-2012 06:15 AM

I registered just to say.. Thanks dude!

I'm from 2 days before the end of the world :D

avery 02-07-2013 01:34 PM

The world is not over.
Thanks from 2013

Democrite 02-20-2013 05:01 PM

Thanks
 
It's the future here, and I want to thank you for this, it's awesome.

jero 04-07-2013 07:38 PM

Thanks!
 
keeping up traditions 7 years later

thanhtd 04-22-2013 10:13 PM

One more thank from the furture here.

nemke 06-01-2013 11:50 AM

I just registered to tell you tnx! 7 years and 7 days later this was just what I was needed.

lleb 06-01-2013 05:23 PM

an other thing you can do, 7 years later, is to create a config file in your ~/.ssh/ directory along these lines:

Code:

ssma-imac:.ssh ssma$ cat config
Host        my_url.com
        Port                2222

Host        11.11.11.11
        Port                2222

Host        *
        Protocol        2
        ForwardAgent        yes
        ForwardX11        yes
        ServeraliveInterval        30
        ServerAliveCountMax        5
        TCPKeepAlive        yes

this way when you ssh user@my_url.com you do not need to pass the -p flag at all, this includes your rsync.

smacedo 07-18-2013 01:19 PM

Hey! From July 2013 - thanks macemoneta - still working :)

(and rsync still does not have a more expedite way!
Also thanks lleb for the tip. Very good.

(I hate to register in forums... this is an exception for tradition sake only!)

chejov 08-09-2013 07:31 AM

Here from seven years later to give thanks for all contributors, and to add my little coin:

To use rsync using a key:

rsync -av --progress --inplace --rsh='ssh -p8023 -i /somepath/private.key' somefile user@host:somedir/

lleb 08-10-2013 11:11 AM

Quote:

Originally Posted by masterross (Post 2260543)
hi,

i want to connect via rsync to remote machine with ssh running on different port

can u assist me?

thanks,
Ross

check out my sig on the HOW TO create a config file for your ssh. This way you can rsync -<options> user@server without having to worry about quoting and ports ext...

sirius2x 11-29-2013 06:35 AM

thanks

lleb 11-29-2013 02:52 PM

Quote:

Originally Posted by smacedo (Post 4992702)
Hey! From July 2013 - thanks macemoneta - still working :)

(and rsync still does not have a more expedite way!
Also thanks lleb for the tip. Very good.

(I hate to register in forums... this is an exception for tradition sake only!)

remember this is not an rsync issue, but a ssh issue. you are using rsync over ssh. this is why i setup the config file and never have to muck with it again.

pedroit 01-26-2014 04:42 PM

Quote:

Originally Posted by macemoneta (Post 2260607)
The syntax you want is, for example:

rsync -av --progress --inplace --rsh='ssh -p8023' somefile user@host:somedir/

In the example above, rsync will use ssh on port 8023.

2014 and it still works. Thanks!

codepuzzle 08-07-2014 03:01 AM

Thank you ;-)

PrFalken 09-22-2014 07:15 PM

Thank you from 2014 ! :)

tillinghast 03-13-2015 03:13 PM

Many thanks from 2015! :-)

egillette 09-02-2015 06:24 PM

2015 -- over a decade later, and this post is still relevant! :-)

florenceit 09-28-2015 01:09 PM

from Sept. 2015, thanks! :)

hherrera 01-29-2016 05:39 PM

From near 10 years in the future, I must thank you. The sentence just save my day ;)

alikasundara 02-18-2016 04:56 PM

Thanks.
It's Thu 18 Feb 22:55:40 GMT 2016. You've been helping people get their rsync right for almost 10 years now :)

lqsl 08-29-2016 02:57 AM

Thanks from almost 12 years later
 
Thanks from almost 12 years later
:D

zaplQ 08-02-2017 06:41 AM

Quote:

Originally Posted by macemoneta (Post 2260607)
The syntax you want is, for example:

rsync -av --progress --inplace --rsh='ssh -p8023' somefile user@host:somedir/

In the example above, rsync will use ssh on port 8023.


Me too. Thanks dude (Really almost 12 years later (just a few days), but hey, better late than never!)

Quote:

Originally Posted by Reuti (Post 4275496)
It can even be shortcut when you have a ~/.ssh/config:
Code:

Host foobar
    Port 8023
    User the_user_example
    Hostname the.host.example

and issue:
Code:

rsync -av --progress --inplace --rsh=ssh somefile foobar:somedir
Although the thread is old, the usage and technics still apply.

For me the rsync --rsh thing didn't work on my mac. Using the config solution here.

So, Thanks dude (Really more than 6 years later, but hey, better late than never!)


Quote:

Originally Posted by diegors (Post 4604529)
[..]
Edit: I just subscribe to say: Thanks =)

(And I too subscribed especially to say thank you.

Hope all is fine with all you out there!

TheRealVillageIdiot 08-09-2019 03:57 PM

Me, too. Thanks dude (13 years, 2 months, 16 days late, but hey, better late than never!) :p

hehehehe




Seriously though, thanks macemoneta! You haven't been on since 02/20/2017 but I hope you're alive and proud of the help you've provided to thousands over the last decade and a half. God bless your soul.


All times are GMT -5. The time now is 06:20 AM.