I set up a new system. I have to use ssh XXXX@XXXXXX to login. It wont let me login via telnet . But I didnt set up any keys. So theres nothing to check against. Can someone explain this to me? Also I have another sysstem with ssh and keys, but it asks users for passwords, not pass phrases?? Thanks.
You'll have to make your question clearer to get a better answer, but you don't need a key to login via ssh. You can use the password for the user you're trying to log in as.
If right now your system doesn't let you try to authenticate via a password it may be configured to require public key authentication. Edit the
/etc/ssh/sshd_config file on the server and make sure
PasswordAuthentication is set to
Telnet is a different protocol from SSH, you cannot use the two interchangeably. Instead of telneting to your host you need to "ssh" using the the ssh command line client or something like PuTTy in windows.
I'm not sure what you mean by "there is nothing to check against", by default SSH allows for both password and keybased auth.
For your other systems you have to make sure you have set up the keys in the correct place. The way it works in breif is:
- User mike trys runs ssh firstname.lastname@example.org
- The system by default will look in /home/mike/.ssh/id_rsa for the ssh private key.
- If the key has a passphrase it will prompt you for it, if not it will just use it.
- On the other end hosta will look inside of /home/mike/.ssh/authorized_keys and see if a matching public key to that private key is there, if found it will authenticate you otherwise it will proceed with normal password authentication.
If you try to ssh running as user bob instead of mike, who doesnt have the right key (or doesnt have one at all) then you wont get prompted for a key pass phrase and the remote box will prompt you for a password.
If you want to setup key auth from the start:
- ssh-keygen -t rsa (defaults for everything, however you should use a password)
- cat /home/username/.ssh/id_rsa.pub (copy output)
- Paste the output of the above command into /home/username/.ssh/authorized_keys on remotehost
- ssh to the remote host using the user you created the key with to the user where you put the authorized keys file.