Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學

Cygwin 在 Windows 8.1 設定 SSH 金鑰免密登入:權限修正關鍵步驟

編輯:Windows 8 系統介紹

在 Windows 8.1 安裝 Cygwin 並設定 SSH 金鑰免密登入時,常遇到 Permissions 0660 for id_rsa are too open 錯誤。原因在於 Cygwin 預設建立的檔案群組為 None,導致 chmod 無法正確收回群組/其他權限。

解決方法

  1. 產生金鑰對:ssh-keygen
  2. 將公開金鑰加入 authorized_keys。
  3. 關鍵步驟: 先指派正確群組,再修改權限:
chgrp Users ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa

指派 Users 群組後,chmod 600 即可生效,SSH 免密登入不再報錯。

Copyright © Windows教程網 All Rights Reserved