anndl: Fixed a couple of bugs.
[utils.git] / rsc
diff --git a/rsc b/rsc
index 0e96deb..74be3fd 100755 (executable)
--- a/rsc
+++ b/rsc
@@ -37,6 +37,12 @@ if($ARGV[0] eq "-s") {
        s/([\\\n])/\\$1/g;
        $arg .= "$_\n";
     }
-    exec "ssh", "$host", "rsc", "-s", encode_base64($arg);
+    $ea = encode_base64($arg);
+    $ea =~ s/\n//g;
+    if(-t STDIN) {
+       push @sshopts, "-t";
+    }
+    push @sshopts, "-q";
+    exec "ssh", @sshopts, "$host", "rsc", "-s", $ea;
     die "$!";
 }