Quote:
|
Quote:
Quote:
Quote:
Quote:
Would I be giving away details of my server or keys that I shouldn't? |
Quote:
Code:
ssh-keyscan localhost > /tmp/x && ssh-keygen -lf /tmp/x && rm /tmp/x If you want to know what it does, there are three parts: 1) ssh-keyscan localhost > /tmp/x This dumps out the server key for the system on which you run the command into a file called "x" located in /tmp/. This would be the same as running "cp /etc/ssh/ssh_host_rsa_key.pub /tmp/x", which is the file I asked you to look at earlier and you just assumed you wouldn't be able to and didn't try...the public key files are world-readable, you don't need to be root. 2) ssh-keygen -lf /tmp/x The -f flag tells it to read from the provided file, the -l flag tells it to print the fingerprint 3) rm /tmp/x Cleans up the temporary file that you created with #1. All of which could be shortened to simply: Code:
ssh-keygen -lf /etc/ssh/ssh_host_rsa_key.pub |
suicidaleggroll,
I was trying to follow your instructions, but I have the following issue in Terminal when I try to ssh into my VPS. Here is what is happening... Code:
user1s-MacBook-Pro:~ user1$ ssh vps-user@111.222.333.44 -p 22 Why is it asking for a password?? The whole point of setting up a public/private key pair was so I just have to type in my passphrase on the private key, and NOT enter my cpanel password. This is all very frustrating... |
Permissions are the usual cause.
On the remote server, run the following: Code:
chmod 600 ~/.ssh/authorized_keys |
Quote:
I have a VPS with CentOS6 and cPanel, but no Root access of my own. I thought the way I would execute your code above for the server key was supposed to be done after I SSH'ed into my VPS, but then I got that password issue. So where and how do I run the chmod commands you recommend? Quote:
So I can see my public key in cPanel, but I didn't do anything with ~/.ssh/authorized_keys You'll have to help explain this to me as I learn all about Sys Admin stuff! |
I know nothing about cPanel, can't help you there.
You said you were prompted for a password, did you enter it? Do you know it? |
Quote:
|
The chances of that are incredibly low. Are you connecting using the domain name or IP address? If the IP, then the chances are practically non-existent.
|
Quote:
I took a chance and entered my password into SSH since my key pair stopped working. At the command prompt on my server, I did this... vps-user@111.222.333.44 [~}# ls I see... etc/ .ssh/ In etc/ is a directory called mydomain.com but there is nothing in it. In .ssh/ I see... authorized_keys authorized_keys2 id_rsa.pub I think this is one problem. Why do I have 2 authorized_key files? I built a spreadsheet with two input fields (i.e. "Fingerprint from Web-Host" and "Fingerprint from Terminal") and created a formula to show MATCH/NO MATCH. From there I went into TextWrangler and pasted the KEY from my MacBook's ~/.ssh/known_hosts file into "Fingerprint from Terminal". Then I proceeded to run... cat authorized_keys cat authorized_keys2 cat id_rsa.pub ...and pasted the contents of each into the "Fingerprint from Web-Host" field. (In this case I am comparing KEYS and not fingerprints.) There was NO MATCH in any of the three comparisons?! So what is going on here??? |
The fingerprint is not the public key. The fingerprint is calculated from the public key, and you've been given the command to do this calculation THREE TIMES already.
And as has already been explained to you, nothing you will find in ~/.ssh on the server has anything to do with this question, at all. The key you are looking for, the one that has to do with the server proving it is who it says it is, is in /etc/ssh. |
authorized_keys2 is not used by default by any tool, it can only be a backup or something like that.
|
Quote:
Quote:
Quote:
The conversation as evolved as I learn more, and I am taking people's advice and asking questions along the way to learn more. |
Quote:
What I don't understand is why I can't see this path in Terminal? (I explained this in another post, but it seems like my questions and comments get skipped a lot.) How can I run that command when there is no visiable directory structure or file there? |
Quote:
Quote:
That said, I don't understand the question. What can't you see in the terminal? There's no directory structure or file where? Best guess at interpreting your question is that you're confused about the difference between relative and absolute paths: http://www.linuxnix.com/abslute-path...-in-linuxunix/ |
All times are GMT -5. The time now is 05:12 PM. |