paths and ssh connections

Ask a Question related to Mac Applications & Software, Design and Development.

  1. #1

    Default Re: paths and ssh connections

    Christopher Masi <cjmasi@*nogarbageplease*rcn.com> writes:
    > When I establish an ssh connetion from my PB 1400c to my Pismo or an ssh
    > connection from my Pismo to itself, my paths get screwed up.
    >
    > For example, in a terminal.app window I type "rasmol-272" and RasMol
    > v.2.7.2.1 launches; however, if I first do ssh and establish an ssh
    > connection to myself, rasmol-272 doesn't show up. Other programs
    > dissappear too. For example, xhost and man xhost give command not found
    > and no entry for responses. xclock gives a command not found too.
    >
    > So, what did I screw up? Any ideas?
    >
    > Oh yeah, why do I get a TERM_PROGRAM: undefined variable when I ssh, or
    > when xterm starts along with Apple's x11.app?
    try doing

    ssh -X

    to enable X forwarding (which defaults to disabled on the Os X
    supplied ssh client).

    Next question is, suppose you want X forwarding _on_ by default.

    Is it as simple as editing ssh_config in /etc, or do you have to do
    some crazy netinfo thing?
    Hal Sadofsky Guest

  2. Similar Questions and Discussions

    1. How do I do this... re-paths
      I am sure that this is a simple task, and hopefully I can give an uncomplicated description of what I am trying to do. I have a complex rectangular...
    2. Bringing paths into Photoshop from AI as PATHS
      What happened to bringing paths into Photoshop from Illustrator as PATHS? Used to be able to copy paths into Photoshop from AI 8 as a path. Can this...
    3. Paths
      Hi All After converting text to paths, is it possible in FH9 to unconvert it after it has been saved so undo won't work -- Kind Regards Gina...
    4. Help with paths
      I have been using SSI would like to start using php From what I have seen php does not support absolute paths like SSI eg <!--#include...
    5. need general help with setting paths & man paths for apps
      On Thu, 10 Jul 2003, solaris newbie wrote: That is one way, but a (perhaps) beter way would be to modify PATH in individual user's .profile. ...
  3. #2

    Default Re: paths and ssh connections

    On 18 Jul 2003 15:07:41 -0700, Hal Sadofsky wrote:
    > Christopher Masi <cjmasi@*nogarbageplease*rcn.com> writes:
    >> When I establish an ssh connetion from my PB 1400c to my Pismo or an ssh
    >> connection from my Pismo to itself, my paths get screwed up.
    >> For example, in a terminal.app window I type "rasmol-272" and RasMol
    >> v.2.7.2.1 launches; however, if I first do ssh and establish an ssh
    >> connection to myself, rasmol-272 doesn't show up. Other programs
    >> dissappear too. For example, xhost and man xhost give command not found
    >> and no entry for responses. xclock gives a command not found too.
    >> So, what did I screw up? Any ideas?
    >> Oh yeah, why do I get a TERM_PROGRAM: undefined variable when I ssh, or
    >> when xterm starts along with Apple's x11.app?
    > try doing
    > ssh -X
    > to enable X forwarding (which defaults to disabled on the Os X
    > supplied ssh client).
    > Next question is, suppose you want X forwarding _on_ by default.
    > Is it as simple as editing ssh_config in /etc, or do you have to do
    > some crazy netinfo thing?
    It's even simpler than that, since you don't even need to use sudo or the
    equivalent.

    Just create your own personal ~/.ssh/config file and include the entry

    ForwardX11 yes

    which overrides the entry in /etc/ssh_config. While you are at it, that
    same file is also the place where you can enter host definitions, so that
    you can simply type

    ssh otherhost

    and have ssh automatically expand it to

    ssh [email]mylogin@otherhost.some.doma[/email]in

    as described in the ssh_config(5) man page. The configuration lines to
    do this would be

    Host otherhost
    User mylogin
    HostName otherhost.some.domain

    and you can have entries like these for each host you connect to. In my
    case, I don't need the "User" line, since it is always the same.

    --
    Dave Seaman
    Judge Yohn's mistakes revealed in Mumia Abu-Jamal ruling.
    <http://www.commoncouragepress.com/index.cfm?action=book&bookid=228>
    Dave Seaman Guest

  4. #3

    Default Re: paths and ssh connections

    Christopher Masi <cjmasi@*nogarbageplease*rcn.com> wrote on Fri 18 Jul
    2003 01:24:45p:
    > Oh yeah, why do I get a TERM_PROGRAM: undefined variable when I ssh,
    > or when xterm starts along with Apple's x11.app?
    /usr/share/tcsh/examples/aliases is being read by your shell, but it
    has a typo that Apple has not fixed.

    Change the TERM_PROGRAM section near the bottom of that file to this.
    Basically, you're just wrapping the original if-then around another if-
    then that checks to see if TERM_PROGRAM has been set. Be careful with
    the settermtitle line. There are control characters in there that
    might not travel well over a copy/paste and Usenet. That line is not
    changed in the fix, but I included it here for clarity.

    if ($?TERM_PROGRAM) then
    if ("$TERM_PROGRAM" == "Apple_Terminal") then
    alias settermtitle 'echo -n "^[]2;\!:1^G"'
    endif
    endif

    hn
    WeSaySo Guest

  5. #4

    Default Re: paths and ssh connections

    Dave Seaman <dseaman@no.such.host> writes:
    > On 18 Jul 2003 15:07:41 -0700, Hal Sadofsky wrote:
    > > Christopher Masi <cjmasi@*nogarbageplease*rcn.com> writes:
    >
    > >> When I establish an ssh connetion from my PB 1400c to my Pismo or an ssh
    > >> connection from my Pismo to itself, my paths get screwed up.
    >
    > >> For example, in a terminal.app window I type "rasmol-272" and RasMol
    > >> v.2.7.2.1 launches; however, if I first do ssh and establish an ssh
    > >> connection to myself, rasmol-272 doesn't show up. Other programs
    > >> dissappear too. For example, xhost and man xhost give command not found
    > >> and no entry for responses. xclock gives a command not found too.
    >
    > >> So, what did I screw up? Any ideas?
    >
    > >> Oh yeah, why do I get a TERM_PROGRAM: undefined variable when I ssh, or
    > >> when xterm starts along with Apple's x11.app?
    >
    > > try doing
    >
    > > ssh -X
    >
    > > to enable X forwarding (which defaults to disabled on the Os X
    > > supplied ssh client).
    >
    > > Next question is, suppose you want X forwarding _on_ by default.
    >
    > > Is it as simple as editing ssh_config in /etc, or do you have to do
    > > some crazy netinfo thing?
    >
    > It's even simpler than that, since you don't even need to use sudo or the
    > equivalent.
    >
    > Just create your own personal ~/.ssh/config file and include the entry
    >
    > ForwardX11 yes
    Good point. But I'd still like to know if editing /etc/ssh_config works
    to change the machine's behavior globally (for all accounts) or if
    some netinfo thing is necessary.

    More to the point, I'd like to generally understand when I have to use
    netinfo, and when I can edit the configuration file in /etc!

    Hal Sadofsky Guest

  6. #5

    Default Re: paths and ssh connections

    In article <cgsmp3biaa.fsf@darkwing.uoregon.edu>,
    Hal Sadofsky <sadofsky@darkwing.uoregon.edu> wrote:
    > Christopher Masi <cjmasi@*nogarbageplease*rcn.com> writes:
    >
    > > When I establish an ssh connetion from my PB 1400c to my Pismo or an ssh
    > > connection from my Pismo to itself, my paths get screwed up.
    > >
    > > For example, in a terminal.app window I type "rasmol-272" and RasMol
    > > v.2.7.2.1 launches; however, if I first do ssh and establish an ssh
    > > connection to myself, rasmol-272 doesn't show up. Other programs
    > > dissappear too. For example, xhost and man xhost give command not found
    > > and no entry for responses. xclock gives a command not found too.
    > >
    > > So, what did I screw up? Any ideas?
    > >
    > > Oh yeah, why do I get a TERM_PROGRAM: undefined variable when I ssh, or
    > > when xterm starts along with Apple's x11.app?
    >
    > try doing
    >
    > ssh -X
    >
    > to enable X forwarding (which defaults to disabled on the Os X
    > supplied ssh client).
    >
    > Next question is, suppose you want X forwarding _on_ by default.
    >
    > Is it as simple as editing ssh_config in /etc, or do you have to do
    > some crazy netinfo thing?
    I don't think it is the X forwarding option that is the problem. I did
    ssh -l username 127.0.0.1 -X and I still got command not found. When I
    check my environment after ssh'ing, I get the following for my path.

    usr/bin:/bin:/usr/sbin:/sbin

    My terminal.app path has more stuff in it. Can I add to my ssh path
    using the global setting file, or ~/.ssh/config. Is it the same as
    adding path info to .tcshrc?

    Thanks!
    Chris
    Christopher Masi Guest

  7. #6

    Default Re: paths and ssh connections

    In article <cjmasi-1CCF2B.22462319072003@reader1.news.rcn.net>,
    Christopher Masi <cjmasi@*nogarbageplease*rcn.com> wrote:
    > In article <cgsmp3biaa.fsf@darkwing.uoregon.edu>,
    > Hal Sadofsky <sadofsky@darkwing.uoregon.edu> wrote:
    >
    > > Christopher Masi <cjmasi@*nogarbageplease*rcn.com> writes:
    > >
    > > > When I establish an ssh connetion from my PB 1400c to my Pismo or an ssh
    > > > connection from my Pismo to itself, my paths get screwed up.
    > > >
    > > > For example, in a terminal.app window I type "rasmol-272" and RasMol
    > > > v.2.7.2.1 launches; however, if I first do ssh and establish an ssh
    > > > connection to myself, rasmol-272 doesn't show up. Other programs
    > > > dissappear too. For example, xhost and man xhost give command not found
    > > > and no entry for responses. xclock gives a command not found too.
    > > >
    > > > So, what did I screw up? Any ideas?
    > > >
    > > > Oh yeah, why do I get a TERM_PROGRAM: undefined variable when I ssh, or
    > > > when xterm starts along with Apple's x11.app?
    > >
    > > try doing
    > >
    > > ssh -X
    > >
    > > to enable X forwarding (which defaults to disabled on the Os X
    > > supplied ssh client).
    > >
    > > Next question is, suppose you want X forwarding _on_ by default.
    > >
    > > Is it as simple as editing ssh_config in /etc, or do you have to do
    > > some crazy netinfo thing?
    >
    > I don't think it is the X forwarding option that is the problem. I did
    > ssh -l username 127.0.0.1 -X and I still got command not found. When I
    > check my environment after ssh'ing, I get the following for my path.
    >
    > usr/bin:/bin:/usr/sbin:/sbin
    >
    > My terminal.app path has more stuff in it. Can I add to my ssh path
    > using the global setting file, or ~/.ssh/config. Is it the same as
    > adding path info to .tcshrc?
    >
    > Thanks!
    > Chris
    Thanks to WeSaySo <tryandguessit@yahoo.com>

    I fixed the "TERM_PROGRAM: undefined variable" thing as you suggested,
    and suddenly all my paths appear in X11.app's xTerm and when I establish
    ssh connections.

    Thanks!
    Chris
    Christopher Masi Guest

  8. #7

    Default Re: paths and ssh connections

    Hal Sadofsky <sadofsky@darkwing.uoregon.edu> wrote in comp.sys.mac.system:

    [big snip]
    > More to the point, I'd like to generally understand when I have to use
    > netinfo, and when I can edit the configuration file in /etc!
    In general, if a configuration file is delivered with OS X, but not
    (normally) used, it will contain a comment to that effect. So, as a
    first step, just edit the file you want to edit, but look for comments
    first.

    If a configuration file doesn't exist, or if you aren't sure if it
    was delivered with the OS, it's harder. You can look at "man nidump"
    to check the dump "format"s it provides. The format names are the
    names of corresponding configuration files (minus the leading /etc/,
    or whatever), like "hosts", "passwd", and so on. If there is *no*
    corresponding format, the configuration file is almost certainly
    active.

    Otherwise, there is only poking around with NetInfo Manager to see
    if there is something in NetInfo that looks like the corresponding
    file.

    The book _OS X for Unix Geeks_ (O'Reilly) has a comprehensive list (it
    isn't long). IIRC it dedicates a chapter to this subject.

    Anno
    Anno Siegel Guest

  9. #8

    Default Re: paths and ssh connections

    [email]anno4000@lublin.zrz.tu-berlin.de[/email] (Anno Siegel) writes:
    > Hal Sadofsky <sadofsky@darkwing.uoregon.edu> wrote in comp.sys.mac.system:
    >
    > [big snip]
    >
    > > More to the point, I'd like to generally understand when I have to use
    > > netinfo, and when I can edit the configuration file in /etc!
    >
    > In general, if a configuration file is delivered with OS X, but not
    > (normally) used, it will contain a comment to that effect. So, as a
    > first step, just edit the file you want to edit, but look for comments
    > first.
    Thanks. This is helpful, and I guess not so tricky. I look at the
    difference between /etc/printcap and /etc/sshd_config and see quite
    clearly that one is not worth editing and the other might be!
    > If a configuration file doesn't exist, or if you aren't sure if it
    > was delivered with the OS, it's harder. You can look at "man nidump"
    > to check the dump "format"s it provides. The format names are the
    > names of corresponding configuration files (minus the leading /etc/,
    > or whatever), like "hosts", "passwd", and so on. If there is *no*
    > corresponding format, the configuration file is almost certainly
    > active.
    >
    > Otherwise, there is only poking around with NetInfo Manager to see
    > if there is something in NetInfo that looks like the corresponding
    > file.
    >
    > The book _OS X for Unix Geeks_ (O'Reilly) has a comprehensive list (it
    > isn't long). IIRC it dedicates a chapter to this subject.
    Thanks for the recommendation.
    Hal Sadofsky Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139