ssh localhost “Permission denied (publickey)
再次遇到 SSH Server And “Permission denied (publickey)
用這個關鍵詞搜尋才找到howtogeek上答案: sshd : Authentication refused: bad ownership or modes for directory /
直接用我文章題目中的搜尋,這次不管用。
看log
$ grep sshd /var/log/audit/audit.log
這個命令很有用。它會告訴你原因。
May 17 16:21:25 localhost sshd[30255]: Authentication refused: bad ownership or modes for directory /home/username
原因很清楚了。是目錄許可權不對。
方法是:
Fixing Authentication refused: bad ownership or modes for directoryFrom HowToGeekIf you get this error in your logs when trying to setup public key authenticated automatic logins, the problem is a permissions one.You’ll need to perform the following commands on the user account you are trying to setup:
chmod go-w ~/
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
http://www.howtogeek.com/wiki/Fixing_Authentication_refused:_bad_ownership_or_modes_for_directory
chmod go-w ~/ 這個很重要。如果你的使用者目錄被設定為其它使用者和組使用者可以寫,那麼即時你更改了 .ssh 目錄和其檔案也不管用!!!!! 我浪費了多少時間啊。 :( 我做了下面兩步,但還是不行。 Permission denied (publickey).
Make sure you do the following:
Make sure the permissions of the .ssh folder are 0700Make sure the permissions of the authorized_keys file are 0600Make sure the user owns the .ssh folder and contents (normally that’s the case but just to make sure)http://blog.artooro.com/2010/02/19/ssh-server-and-permission-denied-publickey/
$ grep sshd /var/log/audit/audit.log
May 17 16:21:25 localhost sshd[30255]: Authentication refused: bad ownership or modes for directory /home/fltrpMay 17 16:21:35 localhost sshd[30257]: Authentication refused: bad ownership or modes for directory /home/fltrphttp://serverfault.com/questions/230771/ssh-configuration-publickeys-permission-denied-publickey-password-error
原文地址:
public-key生成命令(客戶端)
# ssh-keygen -t dsa -f ~/.ssh/id_dsa
# cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
[註釋:~/.ssh/id_dsa.pub檔案為公鑰,拷貝到Server的~/.ssh/目錄中,執行cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys,許可權只給使用者本人,否則無法連線]
允許root直接登入
編輯/etc/ssh/sshd_config, 重新啟動sshd
PermitRootLogin yes
相關推薦
ssh localhost “Permission denied (publickey)
再次遇到 SSH Server And “Permission denied (publickey) 用這個關鍵詞搜尋才找到howtogeek上答案: sshd : Authentication refused: bad ownership or modes for dir
github windows配置以及ssh生成 Permission denied (publickey)
列表 dde win 依次 是否 密碼 cmd命令 eight 頭像 1:進入cmd命令下,或者可以使用GIt工具 (如果出現了 Permission denied 或者配置多個SSH Key跳第6步) git工具 下載地址:https://git-scm.c
centos7 伺服器ssh登入 Permission denied (publickey). 問題
問題原因:.ssh資料夾和authoried_keys檔案的許可權問題 估計這裡和SELinux 有關(沒有細看)解決方案: chmod 700 .ssh 修改.ssh檔案許可權 chmod 644 authorized_key
SSH登陸阿裏雲服務器出現Permission denied (publickey)錯誤解決方案
ckey 是個 鑰匙串 col code gen fff font 重啟 操作環境: 操作系統:Mac10.11.5 阿裏雲服務器:Ubuntu16.04 遠程連接:SSH 註:首先我們已假設你已經自己生成了SSH秘鑰,並已經配置到阿裏雲、綁定了自己的雲服務器。 但是
Git使用SSH提交代碼到server出現 permission denied (publickey).
space lin none ssh-key denied .net 過程 geo rep 在GitBush中向已經存在的Repository提交README.md改動。命令例如以下: touch README.md git init git add README
Permission denied (publickey)錯誤 git遠端庫與本地庫同步 git設定ssh公鑰 Bad escape character 'ygen'
最近剛學了一點git,然後就想在github上建一個遠端ACM倉庫同步我寫的ACM的程式碼。 我看的是廖雪峰的網站:廖雪峰教的新增遠端庫與本地庫同步 然後我照著上面的教程一步步弄,最後出現瞭如題:Permission denied (publickey)的錯
github後臺配置ssh key之後本地無法git clone的問題 Permission denied (publickey).
當你在github後臺添加了ssh keys之後,如果你在本地 git clone git://www.somesite.com/test.git 的時候出現了一些問題,不如access denied,那麼你要在本地這麼測試一下: ssh -T [email
Can't ssh out : Fixing "Permission denied (publickey,password,keyboard-interactive)."
Suppose you're on a relatively secure Linux box and receive the following message when trying to ssh out interactively (no keys) : Permission denied (pu
ssh遠端登入伺服器時提示'Permission denied (publickey)'的解決辦法
scp遠端拷貝檔案時提示錯誤: Warning: Permanently added '10.0.0.182' (RSA) to the list of known hosts. Permission denied (publickey). 解決: 登入10.0.0.18
普通使用者ssh免密登陸完美解決(Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password))
又很久沒寫部落格了,今天寫一篇很有用的。嘿嘿,剛解決了問題,搞得我三天沒睡好覺。 現在一身輕鬆,希望同樣問題的小夥伴能解決同樣的問題,睡個好覺,也是給自己留個筆記。 ssh免密登陸(我是使用hado
由於SSH配置檔案的錯誤,導致的Permission denied (publickey)及其解決方法
F:\Workspaces\Github_Workspace> ssh -T [email protected] Warning: Permanently added 'github.com,192.30.252.129' (RSA) to the list of know n hosts
Ubuntu SSH Permission denied (publickey) 遠端linux需要公鑰
Ubuntu SSH Permission denied (publickey) 遠端linux需要公鑰 說明: 1.192.168.1.25 是遠端端的linux機器,上面已經配置了ssh服務端,生成了公鑰私鑰,win下面匯入id_rsa就可以遠端登陸了
關於ssh連線主機,git連線github失敗的問題:ssh -T [email protected]&&Permission denied (publickey)
關於ssh連線主機,git連線github失敗的問題 問題:$ ssh -T [email protected] Permission denied (publickey) 解析: 1、可以看出問題出在publickey(公鑰) 2、接著ssh -T -v git@g
Failed to connect to the host via ssh: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password
chan conn roo ansible 命令 password msg 1.7 mission Centos7.5 執行ansible命令報錯 問題: [root@m01 ~]# ansible servers -a "hostname" -i ./
Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights
please sudo _id ima upd cal .com root pin 第一次提交遇到這樣的情況,怎麽回事呢,我在github上提交了ssh key 的啊。 排查先看看能不能解析, 1.先 ping https://github.com 把ip添加到 ho
Permission denied (publickey). fatal: Could not read from remote repository.
ech IT git 生成 兩個文件 tin 一個 繼續 con 執行語句git push -u origin master的時候出現下面的錯誤 Permission denied (publickey).fatal: Could not read from remo
Permission denied (publickey,gssapi-keyex,gssapi-with-mic)
免密碼 etc sys keys 權限 sla word 總結 都是 當出現警告的時候,恭喜你,你已經離成功很近了。 遠程主機這裏設為slave2,用戶為Hadoop。 本地主機設為slave1 以下都是在遠程主機slave2上的配置,使得slave1可以免密碼連接到s
git Permission denied (publickey). fatal: Could not read from remote repository.
問題描述: 最近剛剛學爬蟲,從學長的git上clone到伺服器的時候 出現的這個問題,問題不大吧,估計以後還會遇到。 問題很簡單,就是沒有祕鑰,顯然github不知道你是誰,然後禁止你拉取程式碼。 原理:本地生成祕鑰,然後新增到GitHub裡面 DONE 解決方法: 1.本地生成祕鑰:
git管理github提示Permission denied (publickey) git clone出錯
需要到github賬號中設定ssh公鑰資訊。 在 GitHub 網站中的"account settings": "Setting -> SSH Keys"->"New SSH key" Title填寫“id_rsa.pub”或其他資訊 在本地: $ &nb
00 git clone 提示Permission denied (publickey). fatal: Could not read from remote repository.
執行git clone命令為:git clone xxxxx的時候提示 Permissiondenied (publickey). fatal:Could not read from remote repository. Pleasemake sure you have