Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

On a FreeBSD system (8.1), I am looking for instructions on how to check the running version of OpenSSH and also instructions on the best way to download install an update of OpenSSH

share|improve this question

3 Answers 3

up vote 9 down vote accepted

Run sshd -V or ssh -V and they'll return the version and usage information.
Note: These are capital "V" now, when I originally wrote this answer they were lower case.

There's a dozen ways to upgrade.

  • pkg-add -r openssh-portable
  • cd /usr/ports/security/openssh && make install clean
  • portupgrade security/openssh-portable
  • part of the makeworld/buildworld process
  • freebsd-upgrade
  • and the list goes on...

I'm not aware of any issues with the 5.2p1 version that shipped with 8.1-RELEASE. I have seen hoax e-mails flying around for over a year now announcing the imminent release of a zero day hack (note that it's been a year and a half since release, so 'zero' day was a heck of a long time ago).

share|improve this answer
    
Agree with everything, except 8.1-RELEASE has OpenSSH 5.4p1. –  hmallett Dec 16 '10 at 20:56
    
I needed to use ssh -V (note capital v) as on my system (and I thought this was standard) the -v option is used for verbose (iirc). –  Mike H-R Nov 13 at 10:38
    
@MikeH-R Thanks, not sure when it changed, but it's definitely capital V now. –  Chris S Nov 13 at 14:44
telnet localhost 22

Why do you want to upgrade OpenSSH? It's part of the core system and is usually upgraded with the system.

share|improve this answer
    
This assumes your running the daemon. –  Chris S Dec 16 '10 at 16:30
    
Awesome answer. Exactly what I was looking for. I always run the daemon –  portforwardpodcast Jan 27 at 21:12

Try running:

which sshd

If that prints /usr/sbin/sshd, then it's probably installed as a package. In that case, you can check the installed version using:

pkg_info | grep ssh

or:

pkg_info -W `type sshd`

And I think you update it using:

pkg_add -r openssh-portable

but read the FreeBSD Guide to the Packages System first, because I haven't done that in a long time and it might have changed.

If

which sshd

prints /usr/local/sbin/sshd, then it's probably installed as a port.

Read up on how to upgrade it in the Guide to Using the Ports System. The port name is security/openssh-portable, i.e. /usr/ports/security/openssh-portable.

share|improve this answer
1  
Of course, if you really wanted the running version rather than the installed version, you could also try "telnet localhost 22", and look for the version number. The version number is the second number, i.e. the number after "OpenSSH_". –  Mikel Dec 16 '10 at 11:36
    

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.