Re: Restricting ssh access to selected hosts

From: Bryan Packer (bryanp@visi.com)
Date: 01/08/03


Date: Tue, 07 Jan 2003 23:34:59 -0600
From: Bryan Packer <bryanp@visi.com>

Michael Siebke wrote:

> Unfortunately, it won't work, yet. As far as I understood the man page,
> this kind of authorization works only with protocol type 1. I generated
> the key pair with the following command:

It works fine for protocol 2, see other poster's message for details.

> The public key was copied to the .ssh directory of the user used for ssh
> login on the server:
> userB@server $ cp morpheus-rsa1.key.pub /home/userB/.ssh/authorized_keys

Check your permissions on the key file an the directory. If memory
serves ssh was pretty fussy about the file permissions and owner/group.
Check your log files (mine are in /var/log/secure and /var/log/messages
on Redhat) for info, both when you start sshd and when you try
connecting. Often times there are helpful hints there.

> May be the following information copied from my sshd_config would help
> to find the problem:
>
> # Part(s) of the /etc/ssh/sshd_config file:
>
> AuthorizedKeysFile .ssh/authorized_keys

If you go with protocol 2 the authorized keys file needs to be
authorized_keys2. My config doesn't have that directive in it at all, so
it may not be necessary.

bryan

-- 
A Freudian slip is when you say one thing but mean your mother.


Relevant Pages

  • Re: ssh?
    ... The version without the "2" is for ssh 1 protocol, and its used should be deprecated as its not as secure as ssh 2. ... thus forbidding ssh1 in the sshd config, and not by luck with the key file. ...
    (Fedora)
  • [NEWS] SSH Protocol Weakness Vulnerability (MITM)
    ... A weakness in the backward compatibility of the SSH Protocol has been ... SSH version 1.0) is unlikely to have the host key for the other protocol ... The SSH daemons advertise one of two major versions, ...
    (Securiteam)
  • SUMMARY: SSH 2.5.2p2 on Tru64 4.0g
    ... SSH is very particular about the permissions on the $HOME/.ssh ... Always pay particular attention the the ssh SERVERs protocol usage. ... when only using the identity.pub or rsa key. ... file on the remote host to reflect the host name without domain that was ...
    (Tru64-UNIX-Managers)
  • Re: Where do the random numbers come from?
    ... I'll look into ssh... ... >>just using an established protocol is that resources on my client are ... > the server is convinced of your identity, a malicious attacker in ... >>Of course you can seed the BouncyCastle random number generator with ...
    (comp.security.ssh)
  • Re: how to react on ssh attacks?
    ... > I recently checked my log files of my ssh service (so far as I ... these attacks will get more sophisticated as time goes on - the ... Protocol 2,1 line in /etc/ssh/sshd_config to say Protocol 2 and then ... Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org ...
    (Fedora)

Quantcast