Content

Link, comment, and if you have time, read.

Fixed: Remote SSH Command Failing

12 January 2009 - Filed under Default

One great way to use SSH is to run a single command on a remote server like this:

ssh user@host command

‘command’ here can be anything and the text output will be piped back to your local terminal.

I was having a problem with a few servers where this wasn’t working. Turns out the problem was this line in my user’s .bashrc

[ -z "$PS1" ] && exit 0

In this case, the -z tests “$PS1″ (the prompt string) for null. Since the prompt was null, .bashrc exited on me. After removing that line, all was fine. If you know a better way to work around this or some very important reason the -z line should stay, feel free to leave a comment.

Tagged: ¤

2009-01-12  »  David Sterry

Talkback

  1. NELSON
    9 September 2010 @ 4:06 am


    CheapTabletsOnline.Com. Canadian Health&Care.No prescription online pharmacy.Special Internet Prices.Best quality drugs. No prescription pills. Buy pills online

    Buy:Female Cialis.Ventolin.Aricept.Benicar.Amoxicillin.SleepWell.Lipothin.Zetia.Seroquel.Nymphomax.Buspar.Lipitor.Advair.Acomplia.Zocor.Cozaar.Prozac.Female Pink Viagra.Wellbutrin SR.Lasix….

Share your thoughts

Re: Fixed: Remote SSH Command Failing







Tags you can use (optional):
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>