Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am lazy to login to my server via ssh to execute just one command.

Like I need to touch /var/www/dir/file.doc. Can I do something like:

srun root@mydomain.com touch /var/www/dir/file.doc
share|improve this question
1  
Best to put the part after touch or any command in general in single quotes so client shell doesn't expand it. –  Ibn Ar-Rashid May 16 '11 at 9:33
add comment

1 Answer

up vote 5 down vote accepted

Yes, you can do

ssh root@mydomain.com touch /var/www/dir/file.doc
share|improve this answer
    
OMG :D I didn't even try obvious solution! Thank you –  fl00r May 16 '11 at 9:36
add comment

Your Answer

 
discard

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.