How to do an rm through ssh



Hello, everybody.

I'm trying to set up a little bash script that will be fired regularly
by the crond.
It should connect over the Internet through SSH to another computer
running Windows + cygwin + sshd, erase old backups and create new ones.

The problem is that this line fails:

ssh -i /root/.ssh/some_user-identity -p XXX some_user@xxxxxxxxxxxxxxx
-s \
"rm -fr /cygdrive/d/backup/$day_of_week/*"

( $day_of_week is 1_Monday, 2_Tuesday, etc, and those directories exist
)
The error message says:

Request for subsystem 'rm -fr /cygdrive/d/backup/4_Thursday/*' failed
on channel 0

What's the meaning of that?
This other line works OK. I guess that discards a lot of possibilities:

scp -i /root/.ssh/some_user-identity -P XXX todays_backup.tar.gz \

some_user@xxxxxxxxxxxxxxx:/cygdrive/d/backup/$day_of_week

What's wrong?

Thank's for your help:

Wences

.



Relevant Pages

  • Re: How to do an rm through ssh
    ... I'm trying to set up a little bash script that will be fired regularly ... by the crond. ... It should connect over the Internet through SSH to another computer ...
    (comp.security.ssh)
  • Re: SSH safety
    ... SSH safety (J.L. ... FC3 missing KDE menu items ... I was wondering how safe it is to open the ssh port up to the internet. ...
    (Fedora)
  • Re: ssh
    ... the internal IPs of the router. ... ssh connection. ... access to internet from the i386, ... Download and play hundreds of games for free on Yahoo! ...
    (Debian-User)
  • Re: Multiple RDP access on one Inet line
    ... A better solution is to use a VPN or Secure Shell (SSH) tunnel. ... How is your network connected to the internet? ... External port 10001 redirect to 3389 for Internal IP 192.168.1.1 ...
    (microsoft.public.windowsxp.work_remotely)
  • Re: packet loss to firewall while Internet link is down
    ... When the Internet link goes down, ssh refuses ... to allow connection from within the LAN to our BSD ... When the Internet is down, the CPU load factor on the ...
    (freebsd-questions)