Tutoring on SSD/SSH

Andrew Mathews andrew_mathews
Mon May 17 11:35:17 PDT 2004


Michael Hipp wrote:
> I'm trying to set up a host (ssd) so that it will accept ssh logins only
> from a client with a prearranged key. But after lots of RTFM, I still
> just don't get it. Can someone clue me in to the basic steps?

The host machine must be running the ssh daemon, usually 
/usr/local/sbin/sshd to accept connections. From the client use the ssh 
(or ssh2) command, usually /usr/local/bin/ssh(2) such as:
ssh2 xxx.xxx.xxx.xxx    Use the -l flag to login as a different user 
such as: ssh2 xxx.xxx.xxx.xxx -l root

The difference in ssh and ssh2 is dependent on the ssh.com or 
openssh.com versions. I use the ssh.com version which is the ssh2 and sshd2.

> And what parameter do you set in the ssd host so that it accepts only
> such connections?
> 
> Thanks,
> Michael
> 

Tough to say. Depends on the distro and tools provided. Start by 
commenting out everything in /etc/inetd.conf. Then run netstat -an | 
grep LISTEN to see what other ports are listening for connections. Find 
the port in /etc/services and shut down those services using the stop 
flag, usually in /etc/rc.d/init.d or /etc/init.d, such as: 
/etc/rc.d/init.d/httpd stop   to stop the apache server. Once everything 
but port 22 is shut down, you're there.
-- 
Andrew Mathews
---------------------------------------------------------------
   6:05pm  up 12:10,  3 users,  load average: 2.51, 2.20, 2.12
---------------------------------------------------------------
Main's Law:
	For every action there is an equal and opposite government program.




More information about the Linux-users mailing list