Loading ...
Sorry, an error occurred while loading the content.

Re: rsync and ssh command

Expand Messages
  • ced23456
    Hi, I ve already modified this file. Here is the PATH in /etc/profile PATH= /usr/local/bin:/usr/bin:/bin:/opt/bin The command: ssh myslug echo $PATH
    Message 1 of 5 , Jun 20, 2010
    • 0 Attachment
      Hi,

      I've already modified this file.

      Here is the PATH in /etc/profile

      PATH="/usr/local/bin:/usr/bin:/bin:/opt/bin"


      The command:

      ssh myslug 'echo $PATH' returns:

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

      So where does the slug finds this PATH ????

      Thanks


      --- In nslu2-linux@yahoogroups.com, "Steve" <steve@...> wrote:
      >
      >
      >
      >
      >
      >
      > In the /etc directory there is a file called 'profile'. Near the top is an entry for PATH. Add the additional path to that string. A ':' separates the items but not at the end. You will probably have to login again.
      >
      > PATH="/usr/local/bin:/usr/bin:/bin:/opt/bin"
      >
      > Steve
      >
      > --- In nslu2-linux@yahoogroups.com, "ced23456" <duchesne.cedric@> wrote:
      > >
      > > Hi,
      > >
      > > I'm trying to connect with rsync on a remote Slug. My slug is running SlugOS.
      > >
      > > When i execute the rsync command, it says sh: rsync not found.
      > >
      > > This relates to a problem in my PATH variable. The command ssh myslug 'echo $PATH' returns '/usr/bin:/bin:/usr/sbin:/sbin'.
      > >
      > > I'm clearly missing the /opt/bin but i have no clue on how to add it.
      > >
      > > WHen i connect myself on the slug the PATH variable is correctly set:
      > >
      > > PATH=/usr/local/bin:/usr/bin:/bin:/opt/bin
      > >
      > >
      > > WHat is the difference between : Me executing an ssh then env command AND ssh executing the command directly. WHy is the PATH different ?
      > >
      > > Thanks
      > >
      >
    • teetee
      ... I ve never use ssh before. However my guess is that command is run by the user running sshd, instead of your own user account on the
      Message 2 of 5 , Jun 22, 2010
      • 0 Attachment
        ced23456 wrote:
        >
        > Hi,
        >
        > I'm trying to connect with rsync on a remote Slug. My slug is running
        > SlugOS.
        >
        > When i execute the rsync command, it says sh: rsync not found.
        >
        > This relates to a problem in my PATH variable. The command ssh myslug
        > 'echo $PATH' returns '/usr/bin:/bin:/usr/sbin:/sbin'.
        >
        > I'm clearly missing the /opt/bin but i have no clue on how to add it.
        >
        > WHen i connect myself on the slug the PATH variable is correctly set:
        >
        > PATH=/usr/local/bin:/usr/bin:/bin:/opt/bin
        >
        >
        > WHat is the difference between : Me executing an ssh then env command AND
        > ssh executing the command directly. WHy is the PATH different ?
        >
        > Thanks
        >
        >
        >


        I've never use
        ssh <server> '<command>'
        before. However my guess is that command is run by the user running sshd,
        instead of your own user account on the slug.

        By the way, you mentioned that you tried to connect to a remote slug by
        rsync, then I think it will make it more clear if you provide information
        about both of the rsync client and the server.
        --
        View this message in context: http://old.nabble.com/rsync-and-ssh-command-tp28940924p28967665.html
        Sent from the Nslu2 - Linux mailing list archive at Nabble.com.
      • Eike Lang
        ... SSH ing into the server in interactive mode will open a login session using your standard shell and profile, using ssh server command does not. This is
        Message 3 of 5 , Jun 23, 2010
        • 0 Attachment
          Am 20.06.2010 um 15:41 schrieb ced23456:

          > WHat is the difference between : Me executing an ssh then env command AND ssh executing the command directly. WHy is the PATH different ?

          SSH'ing into the server in interactive mode will open a login session using your standard shell and profile, using "ssh server command" does not. This is just the way it works.

          The easiest solution is to state the full path to the command or to issue several commands (be sure to escape the semicolons so your local shell does not interpret them) that first set the path and then call the command.
        Your message has been successfully submitted and would be delivered to recipients shortly.