T0ken Posted May 28, 2009 Report Share Posted May 28, 2009 (edited) I just started working at a NOC and we have a private key for ssh that we use on all our servers. All the techs are able to ssh as root to all the servers using this private key. I'm the only tech using Mandriva, and I'm also the only tech who is unable to ssh to a machine without being asked for a password. What I did was: ssh-add [path to key file] When I did that, the message returned was: Identity added: [key file] Now, in theory, I should be able to ssh to any machine without being asked for a password. However, this is what I get when I try to ssh to a machine: The authenticity of host '[x.x.x.x]:port ([x.x.x.x]:port)' can't be established. RSA key fingerprint is xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx. Are you sure you want to continue connecting (yes/no)? What am I missing? Here are the options in my /etc/ssh/ssh_config file: Host * ForwardX11 yes Protocol 2,1 # If this option is set to yes then remote X11 clients will have full access # to the original X11 display. As virtually no X11 client supports the untrusted # mode correctly we set this to yes. ForwardX11Trusted yes # Send locale-related environment variables #SendEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES #SendEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT #SendEnv LC_IDENTIFICATION LC_ALL GSSAPIAuthentication yes Edited May 29, 2009 by T0ken Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted May 28, 2009 Report Share Posted May 28, 2009 Normally, I do it completely different to you. What I do is get that key and add it to the end of .ssh/authorized_keys file in your /home/username directory. For example: cat keyfile >> /home/username/.ssh/authorized_keys and then I can connect to that server in question. Of course, replace keyfile with the name of that file you have with the key inside, and username, with your username on your computer. The >> is important so that you don't overwrite the existing contents of authorized_keys which might have other keys for different servers for you to connect to. Quote Link to comment Share on other sites More sharing options...
T0ken Posted May 29, 2009 Author Report Share Posted May 29, 2009 Thanks for the help! I fixed this today by installing the public key (my trainer either forgot that he need to install it, or Mandriva works with ssh different than Fedora), then adding the private key (after I'd started ssh-agent of course). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.