[techtalk] OpenSSH

Laurel Fan lf25+ at andrew.cmu.edu
Thu Jan 20 16:37:30 EST 2000


Excerpts from linuxchix: 20-Jan-100 [techtalk] OpenSSH by Subba
Rao at attglobal.net 
> I have downloaded OpenSSH and am trying to get it to work
> The sshd is started in .xinitrc.

Any reason you're putting it in .xinitrc?  It doesn't really make a
whole lot of sense to me to make root start x before letting anyone log
in..

> After logging in, the 'ps' command does list it:
>  
> (0)root at myhost:~ => ps waux | grep ssh
> root     18615  0.0  0.8  1424  536 ?    S    Jan19   0:01 sshd -f
/usr/local/etc/sshd_config -h /usr/local/etc/ssh_host_key
>  
> After that, I am issuing the ssh-agent command. I have tried 2 options.
>  
> $ ssh-agent bash
> $ ssh-agent login
>  
> The instance of ssh-agent seem to be valid only for that xterm. 
> Once the xterm is terminated, the ssh-agent is terminated too.

>From the ssh-agent manpage:
     The agent exits automatically when the command given on the command line
     terminates.

     Here's a trick that will allow you to start this up from your .bash_pro-
     file (just put it in as the first thing that happens):

     [ ! "$SSH_AGENT_PID" ] && exec ssh-agent -- bash --login ssh-add

> The keys (identity file) have been generated. Then I add the keys
> using ssh-add.
>  
> (0)root at myhost:~ => ssh-add      
> Need passphrase for /root/.ssh/identity
> Enter passphrase for root at myhost: 
> Identity added: /root/.ssh/identity (root at myhost)  
>  
> When I try to login from NT, using TeraTermPro+TTSSH or Putty, the
> system says invalid password. I have tried the user's Linux password
> and the SSH key passphrase.

First, all this ssh-agent stuff is irrelevant when you're trying to log
in from NT.

ssh-agent is a client program.  When you are running the commands above,
you are setting up the client side of ssh on your Linux machine.

When you try to log in from NT, the Linux box is the server and the NT
is the client.

> The system log has the following entry.
>  
> Jan 20 07:36:23 myhost sshd[21993]: Failed password for ROOT 
>   from 10.3.23.21 port 2483
> Jan 20 07:36:27 myhost sshd[21993]: Received disconnect: 
>  
> What am I doing wrong here? How do I establish the SSH session
> between the Linux and NT boxen?

I don't know.  It's probably either a problem with the server on the
Linux box, or the client on the NT box.

1. You should be logging in with your normal unix password.  Forget all
of your passphrases temporarily. Ignore the ssh-agent stuff for now. 
All that does is RSA authentication, and you can do without it for now. 
Try logging in as both root and a normal user (you _do_ have a normal
user, i hope).

2. First see if the ssh server on the Linux box is up with:

  telnet linuxbox 22

You should get something that looks like

SSH-1.5-OpenSSH-1.2

If so, good, the ssh server is up.  Try this from both the linux and NT.
 From what you've posted above, it does look like ssh is up and
accessible from NT, but we might as well start from the beginning.

3. Check if the server works.  If you have a known working ssh client
(that you've successfully connected to an ssh server), use that to try
to log in to linuxbox.  If you don't, try to use the ssh client on
linuxbox.  If this doesn't work, it's probably a problem on the server.

4. Check if the client works.  If you have a known working ssh server
(that you've successfully connected to with an ssh client), try to
connect to it with the NT client.  If this doesn't work, it's probably a
problem on the client. 

************
techtalk at linuxchix.org   http://www.linuxchix.org




More information about the Techtalk mailing list