Notes for Linux Basix Eps019
The below post is just a quick writeup that can be serve as an addition to the show notes for my segment on the Linux Basix podcast.
Discussion Links:
- Gmail made you look like a spammer this week –> Graham Cluley’s blog Over 4 million Gmail users had their email messages being sent multiple times. “At least if your home or business computer was spewing out spam you can pull the cable out of the back of your PC. With web base services like Gmail you dont have that option”
- http://blog.commandlinekungfu.com/ and http://shelldorado.com/shelltips/beginner.html–> Great blogs for learning the commandline, keep reading and you will be a command line Ninja one day.
- http://garinkilpatrick.com/21-wicked-wordpress-plugins/–> Tons of interesting plug-ins for you to have fun with.
- http://www.cyberciti.biz/tips/top-linux-monitoring-tools.html –> 20 Linux System Monitoring Tools Every SysAdmin Should Know, with over 143 comments a **Must Read**.
Installing OpenSSH 5.6
Now in keeping with my theme of always keeping your software update, I notice that a new version of OpenSSH was released on August 24th. Why update you might as?
List of features that my change your mind:
Changes since OpenSSH 5.5
=========================
Features:* Added a ControlPersist option to ssh_config(5) that automatically
starts a background ssh(1) multiplex master when connecting. This
connection can stay alive indefinitely, or can be set to
automatically close after a user-specified duration of inactivity.* Hostbased authentication may now use certificate host keys. CA keys
must be specified in a known_hosts file using the @cert-authority
marker as described in sshd(8).* ssh-keygen(1) now supports signing certificate using a CA key that
has been stored in a PKCS#11 token.* ssh(1) will now log the hostname and address that we connected to at
LogLevel=verbose after authentication is successful to mitigate
“phishing” attacks by servers with trusted keys that accept
authentication silently and automatically before presenting fake
password/passphrase prompts.Note that, for such an attack to be successful, the user must have
disabled StrictHostKeyChecking (enabled by default) or an attacker
must have access to a trusted host key for the destination server.* Expand %h to the hostname in ssh_config Hostname options. While this
sounds useless, it is actually handy for working with unqualified
hostnames:Host *.*
Hostname %h
Host *
Hostname %h.example.org* Allow ssh-keygen(1) to import (-i) and export (-e) of PEM and PKCS#8
keys in addition to RFC4716 (SSH.COM) encodings via a new -m option
(bz#1749)* sshd(8) will now queue debug messages for bad ownership or
permissions on the user’s keyfiles encountered during authentication
and will send them after authentication has successfully completed.
These messages may be viewed in ssh(1) at LogLevel=debug or higher.* ssh(1) connection multiplexing now supports remote forwarding with
dynamic port allocation and can report the allocated port back to
the user:LPORT=`ssh -S muxsocket -R0:localhost:25 -O forward somehost`
* sshd(8) now supports indirection in matching of principal names
listed in certificates. By default, if a certificate has an
embedded principals list then the username on the server must match
one of the names in the list for it to be accepted for
authentication.sshd(8) now has a new AuthorizedPrincipalsFile option to specify a
file containing a list of names that may be accepted in place of the
username when authorizing a certificate trusted via the
sshd_config(5) TrustedCAKeys option. Similarly, authentication
using a CA trusted in ~/.ssh/authorized_keys now accepts a
principals=”name1[,name2,...]” to specify a list of permitted names.If either option is absent, the current behaviour of requiring the
username to appear in principals continues to apply. These options
are useful for role accounts, disjoint account namespaces and
“user@realm”-style naming policies in certificates.* Additional sshd_config(5) options are now valid inside Match blocks:
AuthorizedKeysFile
AuthorizedPrincipalsFile
HostbasedUsesNameFromPacketOnly
PermitTunnel* Revised the format of certificate keys. The new format, identified as
ssh-{dss,rsa}-cert-v01@openssh.com includes the following changes:- Adding a serial number field. This may be specified by the CA at
the time of certificate signing.- Moving the nonce field to the beginning of the certificate where
it can better protect against chosen-prefix attacks on the
signature hash (currently infeasible against the SHA1 hash used)- Renaming the “constraints” field to “critical options”
- Addng a new non-critical “extensions” field. The “permit-*”
options are now extensions, rather than critical options to
permit non-OpenSSH implementation of this key format to degrade
gracefully when encountering keys with options they do not
recognize.The older format is still supported for authentication and may still
be used when signing certificates (use “ssh-keygen -t v00 …”).
The v00 format, introduced in OpenSSH 5.4, will be supported for at
least one year from this release, after which it will be deprecated
and removed.
Install time…
I am attempting to install this on a headless Ubuntu server the first command I am going to try is:
# sudo apt-get install openssh-server openssh-client
Now since this was a recent release your average apt-get install command wouldn’t work here because it takes some time for the many repository to be populated with the new versions.
Obtaining your copy…
Just do a quick wget
wget http://filedump.se.rit.edu/pub/OpenBSD/OpenSSH/portable/openssh-5.6p1.tar.gz
Prerequisites
—————-
You will need working installations of Zlib and OpenSSL.
Zlib 1.1.4 or 1.2.1.2 or greater (earlier 1.2.x versions have problems):
http://www.gzip.org/zlib/
OpenSSL 0.9.6 or greater:
http://www.openssl.org/
Building / Installation
————————–
To install OpenSSH with default options:
./configure
make
make install
While I was waiting with excitement for my new app to build and install I keep getting the following error “configure: error: *** OpenSSL headers missing – please install first or check config.log ***”
Decided to upgrade to version Ubuntu 10.04
- Install update-manager-core if it is not already installed:
sudo apt-get install update-manager-core - Follow the on-screen instructions.
- edit /etc/update-manager/release-upgrades and set Prompt=normal
- Launch the upgrade tool:
sudo do-release-upgrade
Only to realize that the fix was to install the libssl-dev package
apt-get install libssl-dev
Other useful commands I used:
uname -a –> Print basic information currently available from the system (Kernel version and so on)
ssh -v –> Shows you ssh version number
cat /etc/issue –> Shows you your Ubuntu build version
openssh version –> Shows you your openssh version number
Lastly you can take a read of my posting on the DLL hijacking issue if you haven’t been following it.
Links:
http://www.openssh.com/txt/release-5.6
ftp://ftp.ca.openbsd.org/pub/OpenBSD/OpenSSH/portable/INSTALL