Quote:
Code:
ssh-keygen -lf /etc/ssh/ssh_host_rsa_key.pub If I ssh into my server I end up here... Code:
vps-user@mydomain.com [~] # If I then type... Code:
cd etc/ Code:
./ ../ cacheid mydomain.com/ And even if I look in the directory: mydomain.com/ I don't see anything in it. So I concur - and thank you guys - for the command to get the fingerprint for my server, but am curious why that command works when I don't see that directory structure or file in my VPS account. See? |
not etc but /etc (probably)
|
I repeat:
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/ "etc" is a relative path that depends on your current location. "/etc" is an absolute path that does not depend on your current location. Unless you are currently sitting in "/", they are not the same directory. Please read the link. |
Quote:
Quote:
I said above... Quote:
Would be nice if people answer my questions instead of talking around them... |
If the command ran without error, like you said it did, then the file does exist.
Run the following to see it: Code:
ls -l /etc/ssh/ssh_host_rsa_key.pub |
Quote:
|
Quote:
1) Log into the system 2) Run "pwd" |
Quote:
Code:
vps-user@mydomain.com [~]# Code:
cd ../ Code:
vps-user@mydomain.com [/home]# Code:
vps-user@mydomain.com [/home]# ls Code:
/bin/ls: cannot open directory .: Permission denied Which means that I am unable to navigate here to see that this exists... Code:
ls -l /etc/ssh/ssh_host_rsa_key.pub Yes I can run this, and yes it gives me the fingerprint, but that isn't what I asked... I asked why I can execute something I can't navigate to. |
You don't have read permission for /home, but you still have execute permission which allows you to traverse the directory structure. The permissions on /home say nothing about the permissions on /etc or /etc/ssh anyway. You can't do an ls in /home, but you can still cd up to /, perhaps ls there, cd to /etc, ls there, etc.
|
Quote:
|
All times are GMT -5. The time now is 11:10 PM. |