Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have followed all the stepts described here http://sial.org/howto/openssh/publickey-auth/
up until "Ket Access Limits"
and when I try to enter the server from the client I get
this
Look for authorized_keys, check the spelling (i.e. US English spelling of authorized), and check that the permissions are at least 'read' for the user. Also, make sure that the contents of your public key is sitting within this file somewhere:
Code:
cat authorized_keys | grep --file=id_rsa.pub
On the client side, check the file name for your own private key. You may need to specify the name on the ssh command line, i.e.:
check the permissions of the key on the client. might be that one that has permissions that makes it unreadable. anyway, I'm pretty sure that if you use SSH2 (which you should!) the file on the server is named ~/.ssh/authorized_keys2
OpenSSH_4.6p1 Debian-5, OpenSSL 0.9.8e 23 Feb 2007
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to firepower [192.168.1.3] port 22221.
debug1: Connection established.
debug1: identity file /home/stef/.ssh/identity type -1
debug1: identity file /home/stef/.ssh/id_rsa type 1
debug1: identity file /home/stef/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3p2 Debian-9
debug1: match: OpenSSH_4.3p2 Debian-9 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.6p1 Debian-5
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host '[firepower]:22221' is known and matches the RSA host key.
debug1: Found key in /home/stef/.ssh/known_hosts:12
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /home/stef/.ssh/identity
debug1: Offering public key: /home/stef/.ssh/id_rsa
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /home/stef/.ssh/id_dsa
debug1: No more authentication methods to try.
Permission denied (publickey,password).
Are you using a passworded key? Are you sure that you've got the password right? Try using a key with no password, or a simple password first, just to test the system, and then replace it once you know everything works.
Also, try tightening up the permissions of the .ssh folder:
ok,I've put appropriate permissions,
I've tried again,and I've got some better
debug output from verbose switch output.
here are those messages:
Code:
debug1: match: OpenSSH_4.3p2 Debian-9 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.3p2 Debian-9
debug1: An invalid name was supplied
Configuration file does not specify default realm
debug1: An invalid name was supplied
A parameter was malformed
Validation error
debug1: An invalid name was supplied
Configuration file does not specify default realm
debug1: An invalid name was supplied
A parameter was malformed
Validation error
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'firepower' is known and matches the RSA host key.
debug1: Found key in /home/spx2/.ssh/known_hosts:4
I've deleted all .ssh on both machines and started all over.
suppose the machines are called A and B.
I've done this
A/.ssh/id_rsa.pub -> B/.ssh/authorized_keys
B/.ssh/id_rsa.pub -> A/.ssh/authorized_keys
Now I can do ssh from A->B but not B->A.
Was the first one enough to be able to ssh both ways with public keys
or was thesecond one needed ?
Last edited by spx2; 01-11-2008 at 05:26 AM.
Reason: mispelling
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.