Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • Thanks for reply . but both ways it is not working. I have shown in edit part what i did after reading your comment Commented May 18, 2017 at 6:08
  • @user21546, you don't have the quotes around the ENDSSH keyword, you only removed the escapes from the $s. Which means the variable gets expanded by the script calling ssh, and it doesn't have a value there, so you get empty. I meant you could write ssh -t ... << "ENDSSH" (or << 'ENDSSH'), literally, with the quotes. But it doesn't matter, if you leave the terminator unquoted, then just escape the $s, as in your original code. That part is just a style issue. Commented May 18, 2017 at 7:38