公開鍵ファイルauthorized_keysの設置場所とパーミッション
Linuxで鍵を作成するには、ssh-keygenコマンドを使用します。
で、出来た鍵を置く際のパーミッションで、よくハマる箇所があるのでメモ書き。
ファイル | 場所 | パーミッション |
---|---|---|
ユーザールート | /user | 701 |
SSHディレクトリ | /user/.ssh/ | 700 |
公開鍵 | /user/.ssh/authorized_keys | 600 |
ここでよく、.sshディレクトリとauthorized_keysファイルのパーミッションを設定したのに、「接続できません」という事態が発生します。
/var/log/secure
でログを見ると、
sshd[8769]: Authentication refused: bad ownership or modes for directory /home/dacelo
ということで、ディレクトリのパーミッションでエラーになっていることが分かりますね。
ユーザールートを701に変更して、これでOKです。
広告
公開鍵ファイルauthorized_keysの設置場所とパーミッション (http://bit.ly/gYm1ha )
これはまった。ユーザルートは701、~/.sshは700、~/.ssh/authorized_keysは600でssh公開鍵認証。後ろ二つは644,744でも大丈夫そう。
ssh
I just like the helpful info you supply on your articles. I will bookmark your blog and test again here frequently. I am fairly certain I’ll learn many new stuff proper right here! Best of luck for the next!
I read this piece of writing completely about the resemblance of most recent and
preceding technologies, it’s remarkable article.
Heya this is somewhat of off topic but I was wanting to know if blogs
use WYSIWYG editors or if you have to manually code with HTML.
I’m starting a blog soon but have no coding knowledge so I wanted to
get advice from someone with experience. Any help would be greatly appreciated!
I like the valuable info you provide in your articles. I’ll bookmark your weblog and check again here frequently.
I’m quite sure I will learn many new stuff right here!
Best of luck for the next!
If you are going for finest contents like me, just visit this website everyday as it offers feature contents, thanks
There’s certainly a lot to learn about this subject.
I love all of the points you’ve made.
Hi I am so glad I found your blog page, I really found you by mistake,
while I was browsing on Bing for something else,
Anyhow I am here now and would just like to say thank you for a fantastic post and a all round exciting blog (I also love the theme/design), I
don’t have time to read through it all at the minute but I have bookmarked it and also
included your RSS feeds, so when I have time I will be back to read a great deal more,
Please do keep up the superb work.
I’m really inspired together with your writing talents as smartly as with the layout for
your blog. Is that this a paid subject or did you modify it yourself?
Anyway keep up the nice high quality writing, it’s rare to look a great blog like this one today..
Hello there I am so glad I found your blog, I really found you by error, while I
was searching on Digg for something else, Regardless I am
here now and would just like to say many thanks for a remarkable post and a all round
enjoyable blog (I also love the theme/design), I don’t
have time to browse it all at the moment but I have saved it
and also added your RSS feeds, so when I have
time I will be back to read a lot more, Please do keep
up the fantastic job.
Good respond in return of this query with solid arguments and describing the whole thing concerning that.
This is a topic that’s near to my heart… Thank you! Where are your contact
details though?
I was able to find good advice from your articles.