Fedora, where to put my ssh keys to login?
2,479
You can use the option -i
to specify to ssh which identity file it should use.
Also have you checked with ssh - v
what really happen? I mean the keys are really not used or are they used but doesn't match?
Related videos on Youtube
Author by
Jeff Norman
Updated on September 18, 2022Comments
-
Jeff Norman over 1 year
I am trying to redirect my site from
https://localhost
(but written with the ip, likehttps://10.0.7.8
) to another https location likehttps://mysite.com
My current configuration is:
<rewrite> <rules> <rule name="Rewrite to mysite.com" enabled="true" stopProcessing="true"> <match url="(.*)" /> <action type="Redirect" url="https://mysite.com/{R:0}" redirectType="Permanent" /> <conditions logicalGrouping="MatchAll"> <add input="{HTTP_HOST}" pattern="https://10.0.7.8*" /> </conditions> </rule> </rules> </rewrite>
And when I am accessing
https://10.0.7.8
it does not go tohttps://mysite.com
, it stays onhttps://10.0.7.8
Any idea what am I doing wrong?
-
Gilles 'SO- stop being evil' about 9 yearsHave you checked all the permissions? The
.ssh
directory must be 700 (drwx------
), theauthorized_keys
file must be 644 or 640 or 600 (-rw-r--r--
or-rw-r-----
or-rw-------
), and your home directory must not be group-writable. If you can't figure out whether the permissions are correct, post the output ofls -ld ~ ~/.ssh ~/.ssh/authorized_keys
on the server andls -ld ~ ~/.ssh ~/.ssh/id_rsa
on the client. -
Startec about 9 yearsThis is correct. I did have appropriate permissions on the
.ssh
directory. That fixed it. Also, can you tell me what file actually gets checked? is it theauthorized_keys
or theid_rsa.pub
file? -
Gilles 'SO- stop being evil' about 9 yearsThe
id_rsa.pub
file is never read byssh
(but it's useful to keep it around to easily determine where a public key is coming from). The server readsauthorized_keys
and the client needsid_rsa
. -
Startec about 9 yearswhen you say "to keep around" - if I set up keys on another computer I just append the key to the existing
id_rsa.pub
andauthorized_keys
files correct? Isssh
somehow able to parse the files to read the different keys? -
Gilles 'SO- stop being evil' about 9 yearsThe SSH server reads
authorized_keys
. To authorize multiple keys, just append the.pub
files to it. Each line in that file represents one authorized key.
-