Re: ssh in shell

From: Darren Dunham (
Date: 09/27/05

Date: Tue, 27 Sep 2005 16:27:10 GMT

Sascha Kaddatz <> wrote:
> But I wann to redirect this message into a file or variable. Nothing
> works.

What does "nothing works" mean? Do you get output on the screen? Is
the output file created? Is there data in the file? Do you get both
output and error in the file?

> ssh ... "/etc" >?test.dat
> ssh ... "/etc >?test.dat" (for redirecting on the remote system)

What is '>?' supposed to mean? I've never seen that before.

> Did anybody know a solution?

What shell are you using? If you have an sh-style shell then you can
redirect STDERR.

ssh ... "/etc" 2>test.dat

I'm not sure this has anything to do with ssh in particular. It just
seems to be a question of how to redirect STDERR in your shell of

Darren Dunham                                 
Senior Technical Consultant         TAOS  
Got some Dr Pepper?                           San Francisco, CA bay area
         < This line left intentionally blank to confuse you. >