How to do an rm through ssh
- From: "Wences" <wgrillo@xxxxxxxxx>
- Date: 13 Jul 2006 18:26:37 -0700
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
.
- Follow-Ups:
- Re: How to do an rm through ssh
- From: Richard E. Silverman
- Re: How to do an rm through ssh
- From: Unruh
- Re: How to do an rm through ssh
- From: Kimmo Koivisto
- Re: How to do an rm through ssh
- From: Nico Kadel-Garcia
- Re: How to do an rm through ssh
- Prev by Date: Re: Problem with pscp sending share names with spaces
- Next by Date: Re: How to do an rm through ssh
- Previous by thread: Problem with pscp sending share names with spaces
- Next by thread: Re: How to do an rm through ssh
- Index(es):
Relevant Pages
|
|