3

In my environment, I am installing a different SSH server other than openSSH. When I issue a man ssh command, for example, I want it to point to the new ssh server man page, rather than the openssh man page. The only way I have seen to do it so far is to physically copy all the man pages from the new ssh server to the /usr/local/man directory. Does anyone know of an easier/cleaner way to do this, such as a configuration file to point man to look the new man entries where I would provide a directory?

Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278
Vinnie Biros
  • 109
  • 2
  • 6
  • You will have to copy man pages to /usr/share/man after building the ssh server with make. – hek2mgl Apr 02 '13 at 22:43
  • 1
    `export MANPATH=/opt/your-ssh/man:$MANPATH` might do the trick. Otherwise, check what `man man` has to say. – Jonathan Leffler Apr 02 '13 at 22:45
  • It is a vendor ssh server so there will be no compiling or making. Any other ideas? – Vinnie Biros Apr 02 '13 at 22:45
  • One part of programming is knowing how to configure software once it is installed. I don't see this as off-topic for SO. – Jonathan Leffler Apr 02 '13 at 22:48
  • This probably does belong more on Super User, but @Jonathan's point is a reasonable argument in favor of keeping it here. I'd set `MANPATH` as above, but depending on your `man` variant, you may also be able to do `man -M /path/to/ssh/man/dir ssh`, if you don't want to change it. – Jim Stewart Apr 02 '13 at 22:53

1 Answers1

0

Some man implementations will find man pages by searching for them in a location relative to the binary. Thus if your PATH is set up so that you find program foo in /wibble/woot/bin/foo, then man will look for the corresponding manpage in /wibble/woot/bin/../share/man/man1/foo.1.

The actual path used is pretty configurable, so check the details your local man(1) manpage.

That search algorithm may include a reference to $MANPATH, so that'll give you a further way of controlling the search.

Norman Gray
  • 11,978
  • 2
  • 33
  • 56