--prefix at runtime

Jim Knoble jmknoble at pobox.com
Fri Mar 8 14:25:33 EST 2002


Circa 2002-Mar-07 18:21:07 -0600 dixit mandar at webchat.chatsystems.com:

: Does OpenSSH support using a different --prefix at runtime? I have
: different customers installing ssh in different locations, and I'd really
: prefer to maintain one build for them, and only have them change their
: runtime environment as appropriate.
: 
: Usually, the order is
: 
: 1. Is --prefix defined on the command line? If not,
: 
: 2. Is prefix defined via an environment variable? If not,
: 
: 3. Use compiled in --prefix
: 
: I was wondering if something similar already exists, or do we need to code
: this in...haven't dug through the code to check..thanks :-)

The only locations that OpenSSH depends on compiled-in values for are
the files in $(sysconfdir).  For example:

  $(sysconfdir)/ssh_config
  $(sysconfdir)/sshd_config
  $(sysconfdir)/ssh_known_hosts

Check the ssh(1) and sshd(8) man pages for the complete list.

Everything else can be installed wherever you'd like.  Of course, it
takes a bit more trouble to configure things if they don't go in the
compile-time location, but there are several different parameters to
take care of:

  ssh:

    - The location of ssh-askpass.  Configurable via the SSH_ASKPASS
      environment variable.

  sshd:
  
    - The location of sftp-server.  Configurable in sshd_config.
    
    - The default PATH (needed to find the scp program).  Configurable
      in $(sysconfdir)/environment.
    
    - The location of the pidfile.  Configurable in sshd_config.

    etc.

Use the man pages.  You should be able to do this without modifying
source code, as long as $(sysconfdir) remains consistent.

-- 
jim knoble | jmknoble at pobox.com   | http://www.pobox.com/~jmknoble/
(GnuPG fingerprint: 31C4:8AAC:F24E:A70C:4000::BBF4:289F:EAA8:1381:1491)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 262 bytes
Desc: not available
Url : http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20020307/58e9767a/attachment.bin 


More information about the openssh-unix-dev mailing list