Tell ssh to allocate tty if rsc is runs on a tty.
[utils.git] / rsc
diff --git a/rsc b/rsc
index 9e7e760..c915aab 100755 (executable)
--- a/rsc
+++ b/rsc
@@ -39,6 +39,9 @@ if($ARGV[0] eq "-s") {
     }
     $ea = encode_base64($arg);
     $ea =~ s/\n//g;
-    exec "ssh", "$host", "rsc", "-s", $ea;
+    if(-t STDIN) {
+       push @sshopts, "-t";
+    }
+    exec "ssh", @sshopts, "$host", "rsc", "-s", $ea;
     die "$!";
 }