On new servers rsync does not work


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting On new servers rsync does not work
# 1  
Old 11-09-2011
On new servers rsync does not work

Hi,

we have a script that populates some variables and basically does an rysnc which has always worked and we have deployed on 6 servers.
Now we got 2 new solaris servers with the same Solaris 10 OS and ssh and rsync versions but the rsync suddenly stopped working Smilie and I have no ideal why:

Code:
root@fwadmTEST-ezone [dirproxy]> /opt/sfw/bin/rsync --rsync-path=/opt/sfw/bin/rsync -arlzv -e "ssh -oBatchMode=yes -oStrictHostKeyChecking=no -i /opt/user/etc/keys/secret_g_private_key" --include '*/' --include 'access[0-9]*' --include '*http_log*' --include '*HTTP*' --include '*SOCKS*' --include '*streaming*' --exclude '*' --size-only --delete /var/proxy/logs/ secretuser@destinationserver.com:/var/log/proxylogs/fwadmTEST-ezone
You have to specify host.
Usage: ssh [options] host [command]
Options:
  -l user     Log in using this user name.
  -n          Redirect input from /dev/null.
  -F config   Config file (default: ~/.ssh/config).
  -A          Enable authentication agent forwarding.
  -a          Disable authentication agent forwarding (default).
  -X          Enable X11 connection forwarding.
  -x          Disable X11 connection forwarding (default).
  -i file     Identity for public key authentication (default: ~/.ssh/identity)
  -t          Tty; allocate a tty even if command is given.
  -T          Do not allocate a tty.
  -v          Verbose; display verbose debugging messages.
              Multiple -v increases verbosity.
  -V          Display version number only.
  -q          Quiet; don't display any warning messages.
  -f          Fork into background after authentication.
  -e char     Set escape character; ``none'' = disable (default: ~).
  -c cipher   Select encryption algorithm
  -m macs     Specify MAC algorithms for protocol version 2.
  -p port     Connect to this port.  Server must be on the same port.
  -L listen-port:host:port   Forward local port to remote address
  -R listen-port:host:port   Forward remote port to local address
              These cause ssh to listen for connections on a port, and
              forward them to the other side by connecting to host:port.
  -D port     Enable dynamic application-level port forwarding.
  -C          Enable compression.
  -N          Do not execute a shell or command.
  -g          Allow remote hosts to connect to forwarded ports.
  -1          Force protocol version 1.
  -2          Force protocol version 2.
  -4          Use IPv4 only.
  -6          Use IPv6 only.
  -o 'option' Process the option as if it was read from a configuration file.
  -s          Invoke command (mandatory) as SSH2 subsystem.
  -b addr     Local IP address.
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(359)

First time I ran it on the new version ssh complained about the -o options for ssh and I removed a whitespace between -o and the "options" which I changed and now it says we have no destination host.

As I said same version of rsync and ssh and same solaris version and if I copy the above command to another server it works.

Code:
root@fwadmTEST-ezone []> ssh -version
Sun_SSH_1.1.3, SSH protocols 1.5/2.0, OpenSSL 0x0090704f
Bad escape character 'rsion'.
root@fwadmTEST-ezone []> rsync -version
rsync  version 2.6.3pre1  protocol version 28
Copyright (C) 1996-2004 by Andrew Tridgell and others

---------- Post updated at 05:04 PM ---------- Previous update was at 05:01 PM ----------

Oh forgot to mention I tried a single quote and double quotes after the -e so 'ssh...' or "ssh..." make no difference.

---------- Post updated at 05:24 PM ---------- Previous update was at 05:04 PM ----------

Ok I found the problem, somebody added a script called "ssh" that is called before /usr/bin/ in the $PATH variables that only allows one variable for ssh.

This was done to prevent users from doing an ssh as another user aka ssh host works but ssh -l user host or ssh user@host do not work.
# 2  
Old 11-12-2011
right, so just change your -e command to '/usr/sbin/ssh', right?

Also seems to me you're missing the source directory somewhere. The end of that long line should be
Code:
 . secretuser@destinationserver.com:/var/log/proxylogs/fwadmTEST-ezone

perhaps.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Rsync Error: rsync: link_stat failed: No such file or directory (2)

I wish to copy all the files & folder under /web/Transfer_Files/data/ on mymac1 (Linux) to remote server mybank.intra.com (Solaris 10) /tmp/ location I am using Ansible tool synchronize module which triggers the unix rsync command as below:rsync --delay-updates -F --compress --archive --rsh=ssh... (2 Replies)
Discussion started by: mohtashims
2 Replies

2. Shell Programming and Scripting

Rsync in bash script doesn't work even after placing pub key in target server

Hello Friends, My bash script is like this #!/bin/bash # request Bourne shell as shell for job #$ -S /bin/bash # assume current working directory as paths #$ -cwd #$ -N rsync-copy # # print date and time date rsync -rltD --progress "ssh -i /home/myname/.ssh/id_rsa"... (4 Replies)
Discussion started by: jacobs.smith
4 Replies

3. IP Networking

Discussion at work, would a router work pluging a cable in wan1 and lan1?

hi all. and sorry for the random question, but this sparkled a raging flame-war at work and i want more points of view situation a router, with linux of some sort, dhcp client requesting for ip in wan1 (as usual with wan ports) dhcp server listening in lan1, and assigning ip (as usual... (9 Replies)
Discussion started by: broli
9 Replies

4. Shell Programming and Scripting

Rsync is not working at root "/" level between two servers

copying daily changes from serverA to serverB using rsync(solaris8, v2.6.2) at root folder level. serverA: cd / rsync -a -vv --delete --checksum --sparse --stats --dry-run --exclude /tmp/ --exclude /proc/ --exclude /devices/ . root@<IP of ServerB>:/ This is generating mainly three debug... (0 Replies)
Discussion started by: kchinnam
0 Replies

5. Shell Programming and Scripting

My script work on Linux but not work in sunos.

My script work on Linux but not work in sun os. my script. logFiles="sentLog1.log sentLog2.log" intial_time="0 0" logLocation="/usr/local/tomcat/logs/" sleepTime=600 failMessage=":: $(tput bold)Log not update$(tput rmso) = " successMessage="OK" arr=($logFiles)... (7 Replies)
Discussion started by: ooilinlove
7 Replies

6. IP Networking

NIC will not work, but it did work.

I have a client machine that was built and loaded with SCO UNIX 2.1.3, (yes it is old). The machine worked fine on the closed network that I tested on in my shop. I then had to change it to the network that it would be connected to. Below is the host file, router and subnet mask file that I usually... (0 Replies)
Discussion started by: NC user
0 Replies

7. SuSE

rsync

I'm trying to use rsync to sync some data from my windows laptop to my linux openSUSE home sytem using cwRsync. The process has always worked until I got a new laptop and more or less at the same time decided to rebuild my linux box. on linux rsync --version rsync version 3.0.7 protocol... (2 Replies)
Discussion started by: giessenw
2 Replies

8. Shell Programming and Scripting

Root owns removable drive and rsync won't work

I'm using rsync to back up to a usb key rsync -r -t -v -a /home/pc/AGS/ /media/DIESEL/pc/AGS/ It worked fine for a long time, and then not so good. Running from the command line there are a lot of complaints about 'can't chgrp ...'. It's formatted to fat32 so I can read it in all kinds of... (0 Replies)
Discussion started by: triplemaya
0 Replies

9. UNIX for Dummies Questions & Answers

rsync vs cp

Hi guys, I will be copying data from one FS to another. (only once) These are local Filesystems... Which tool would be more efficient to use in this case? There is a huge amount of data that needs to be copied... (1.5TB) John (1 Reply)
Discussion started by: jsy
1 Replies

10. UNIX for Dummies Questions & Answers

Script doesn't work, but commands inside work

Howdie everyone... I have a shell script RemoveFiles.sh Inside this file, it only has two commands as below: rm -f ../../reportToday/temp/* rm -f ../../report/* My problem is that when i execute this script, nothing happened. Files remained unremoved. I don't see any error message as it... (2 Replies)
Discussion started by: cheongww
2 Replies
Login or Register to Ask a Question