LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 02-20-2008, 05:54 AM   #1
mahmoud
Member
 
Registered: Apr 2006
Location: UK
Distribution: Mandriva, Debain, Redhat, Fedora, Ubuntu, FreeBSD
Posts: 269

Rep: Reputation: 30
rsync with ssh


hi
i am trying to use rsync and ssh
i can get it to work using the default port 22 but on my servers the default port isnt 22
rsync -qazog -e ssh user@192.168.0.27:/backup/ /backup/----this works when i change the default ssh port back to 22
but what syntax do i use to tell it the default port lets say its 7722
i tried rsync -qazog -e ssh user@192.168.0.27:/backup/ /backup/
but that didnt work it gives me an error
"ssh: connect to host 192.168.0.27 port 22: Connection refused"
also tried rsync -qazog --port=7722 -e ssh user@192.168.0.27:/backup/ /backup/ and
rsync -qazog -e ssh -p & -P 7722 user@192.168.0.27:/backup/ /backup/
still no joy
but if i ssh -p 7722 user@192.168.0.27 it works

Last edited by mahmoud; 02-20-2008 at 05:57 AM.
 
Old 02-20-2008, 06:04 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
it's ssh that you are giving the port number to, not rsync. try:

rsync -qazog -e ssh -p 7722 user@192.168.0.27:/backup/ /backup/

what was the "-p & -P 7722" bit meant to do? the & will break that into two separate commands.
 
Old 02-20-2008, 06:11 AM   #3
mahmoud
Member
 
Registered: Apr 2006
Location: UK
Distribution: Mandriva, Debain, Redhat, Fedora, Ubuntu, FreeBSD
Posts: 269

Original Poster
Rep: Reputation: 30
i did that is what i meant by -p & -P i tried using lower case p and upper case p still didnt work
 
Old 02-20-2008, 06:46 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
rsync -qazog -e 'ssh -p 7722' user@192.168.0.27:/backup/ /backup/
 
Old 02-20-2008, 11:16 AM   #5
mahmoud
Member
 
Registered: Apr 2006
Location: UK
Distribution: Mandriva, Debain, Redhat, Fedora, Ubuntu, FreeBSD
Posts: 269

Original Poster
Rep: Reputation: 30
thanks that worked
 
  


Reply


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 server vs rsync over ssh humbletech99 Linux - Networking 1 10-18-2006 12:10 PM
rsync over ssh mattsoftnet Linux - Software 2 06-02-2006 01:55 PM
rsync and ssh? IchBin Linux - Newbie 4 02-13-2005 03:41 PM
Rsync vs ssh satimis Linux - Software 7 04-04-2004 06:58 AM
Rsync and SSH Phaethar Linux - Software 3 03-22-2004 03:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 08:47 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration