Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to have a script rename a remote file (with ssh?). I'm not sure how to do it.

share|improve this question

You can use ssh to execute the mv command directly

ssh user@remotehost.tld mv file filenew

share|improve this answer
it's not working – edotan Apr 20 '11 at 14:05
@elad try harder – MDMarra Apr 20 '11 at 14:45
@elad It is working. (perhaps if you tell us why it's not working - error messages and the like - you'll get better guidance...) – voretaq7 Apr 20 '11 at 14:47
@elad: It does work, clearly your configuration is broken. If you tell us what thr error message is that you're getting then there is a chance we can help otherwise your on your own. – Iain Apr 20 '11 at 14:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.