[CCP14 Home: (Frames | No Frames)]
CCP14 Mirrors: [UK] | [CA] | [US] | [AU]

(This Webpage Page in No Frames Mode)

CCP14

Methods, Problems and Solutions

Linux Information for Crystallography

Compiling Secure Shell for Linux/UNIX

then Disabling Unrequired Deamons such as telnetd, ftpd, fingerd, rshd, rlogind, etc

The CCP14 Homepage is at http://www.ccp14.ac.uk

[To Problems and Solutions]
[To: BSD UNIX Information for Crystallography]
[To: Linux Information for Crystallography]
[Back to Installing a Linux and Win95 Dual Boot System] |

Obsolete: check out Compiling and Installing OpenSSH (Secure Shell clone) for Linux/UNIX

Overview

Updated 20th December 2001: SecureShell 1.2.32 released.

Secure shell is a encryption protocol/program for sending and receiving information via possibly insecure networks. This allows you to login to remote machines in a way where the passwords and information are encrypted against possible sniffers/intrusion, that can detect the plain ASCII user names passwords that would normally flow using standard telnet, ftp and other unencrypted protocols.

(An old version of this tutorial for Secure Shell 1.2.27 with manual application of patches is still viewable)



Bear in mind, some or all of the following could be wrong or non-optimal. Thus this information should not be considered as a substitute for thinking for yourself.

Download and Install Secure Shell

  • Run ./configure to generate the make file

  • Run make

  • As root, run make install which installs the executables into /usr/local/sbin and /usr/local/bin; and the configuration files into /etc

  • Edit the /etc/sshd_config file and make the config look the way that makes you happy. I tend to not permit direct root login; do not permit Empty passwords; set the DenyHosts to ALL:ALL and set the AllowHosts to the the domains I want people to be able to log in from, including yourself. I.e.,
    AllowHosts 127.0.0.1 *.ac.uk
    DenyHosts ALL:ALL

  • If you have a policy on trusted hosts within your network, implement this.

  • Still as root, run /usr/local/etc/sshd and check out if this works.

  • Use slogin -l username your-own-computername and see if you can log in to your own box. When prompted about not having a host key, etc, just type yes, that you want to continue the connection. Hopefully you can then log in and have happy times.

  • Try and login to another server (the admin may have to set some Host keys before this is possible) - slogin -l username another-computername

  • Unless you like doing all that SYSV startup script stuff, put a line in the /etc/rc.d/rc.local file to tell Secure Shell to start when booted; i.e.,
    /usr/local/sbin/sshd

  • To properly check this out, try and reboot to make sure this is going to work as it is easy to make typos here. (for Linux: ps ef | grep sshd: for SGI ps -ef | grep sshd) And also actually try to slogin into yourself.

  • If things are happy - time to disable deamons that are not required or that secure shell (ssh) replaces.

Enhancing the Security of the system by disabling unneccessary deamons

Overall, the idea here is that any unneccessary deamon that runs is a possible entry point for a hacker. Thus only running what you require in a safe manner lessens the chance you system will be compromised and data ruined. The following primarily consists of killing off unneeded deamons in the /etc/inetd.conf. They can always be enabled later on if you find that you do need some of them to run.

  • Edit the /etc/inetd.conf file and disable un-needed deamons using a # statement at the start of the line.
    • telnetd (don't need it now that secure shell in running)
    • ftpd (don't need it unless you want to ftp to the machine)
    • gopher (don't need it)
    • shell, login, talk, ntalk (it's all gotta go!)
    • pop-2, pop-3, imap (send it the way of all flesh)
    • finger (send this to hell! - or your favourite retirement home)
    • Anything else you don't like or know about here - send it to heaven - time, auth, linuxconf remote config

  • Restart the inetd deamon using the command killall -HUP inetd

  • Just in case, (do not logout) try and log into yourself (the computer!) using slogin. If you can, things are good. If you cannot, reenable the relevant deamons in inetd.conf (telnetd) and try and figure out what is wrong.
  • Now try and telnet into yourself. This should be refused because the insecure telnet deamon is not running.

  • Done!


Compiling SecureShell on Redhat 6.0 problems.

"There are some pb with the compilation of SSH 2 and Redhat 6.0
To fix your problem:
step 1 : execute ./configure
step 2:  edit the sshconf.h file generated by configure
step 3:  comment out the line #define HAVE_UTMPX_H 1
step 4:  save & run make
step 5:  make install

It worked for me. Good luck"
(Lachlan's Note 19th May 1999: This could already be fixed as when I compiled up 1.2.27, I did not have a problem)


Problem with compiling up ssh 1.2.27 on an old Indy running IRIX 6.5.x

From: gbacon@itsc.uah.edu (Greg Bacon)
Newsgroups: comp.security.ssh
Subject: Re: ssh 1.2.27 failing to decrypy keys on make install?
Date: 1 Jun 1999 21:40:38 GMT
Organization: The University of Alabama in Huntsville
References: [l.cranswick.299.002A3BCE@dl.ac.uk>
Reply-To: Greg Bacon [gbacon@cs.uah.edu>

In article [l.cranswick.299.002A3BCE@dl.ac.uk>,
        l.cranswick@dl.ac.uk (Lachlan Cranswick) writes:
: ON an old SGI Indy running IRIX 6.5x, with gcc 2.8.1.
: 
: On make install of ssh 1.2.7 - the make just continuous
: generates keys, tests the keys, then gives  a
: "private+public failed to decrypt"

Turning down the optimization level has usually solved this problem
for me on IRIX boxen.

Greg
-- 
Must one first batter their ears, that they may learn to hear with
their eyes? Must one clatter like kettledrums and penitential
preachers? Or do they only believe the stammerer?
    -- Nietzsche


Getting ssh to run on startup on an SGI running IRIX

From: werner@visaw.rus.uni-stuttgart.de (Andreas Werner)
Newsgroups: comp.sys.sgi.admin
Subject: Re: sshd
Date: 8 Apr 2000 19:42:51 GMT
Organization: Comp.Center (RUS), U of Stuttgart, FRG


there are lots of ways to do this, but the SGI typical way is:

1. Create a file /etc/init.d/sshd containing the following:

====================================
#! /bin/sh
#
#  start up ssh server at boot
#
case "$1" in
 'start')
    if /sbin/chkconfig sshd ; then
      if test -x /usr/local/sbin/sshd; then
         /usr/local/sbin/sshd
      fi
    fi
 ;;
 'stop')
    /sbin/killall sshd sshd1
 ;;
 *)
    echo "usage: $0 {start|stop}"
 ;;
esac
#
====================================

2. Create two links:

# ln -s ../init.d/sshd /etc/rc0.d/K01sshd
# ln -s ../init.d/sshd /etc/rc2.d/S99sshd

3. Create a config variable:

# chkconfig -f sshd on

That's all, including the possibility to configure the daemon
on or off woth the 'chkconfig' command.

For the experts: Yes, I know that the 'killall' command will
kill user ssh daemons, too, but that's exactly the thing I want 
when the machine shuts down ;-)


[To Problems and Solutions]
[To: BSD UNIX Information for Crystallography]
[To: Linux Information for Crystallography]
[Back to Installing a Linux and Win95 Dual Boot System] |

[CCP14 Home: (Frames | No Frames)]
CCP14 Mirrors: [UK] | [CA] | [US] | [AU]

(This Webpage Page in No Frames Mode)

If you have any queries or comments, please feel free to contact the CCP14