사용자 도구

사이트 도구


linux:ssh

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판 양쪽 다음 판
linux:ssh [2019/11/13 23:04]
kwon37xi [~/.ssh/config]
linux:ssh [2019/11/13 23:05]
kwon37xi [~/.ssh/config]
줄 50: 줄 50:
     HostName IP 혹은 hostname     HostName IP 혹은 hostname
     User 계정명     User 계정명
 +    IdentitiesOnly yes
  
 # 특정 key 지정 # 특정 key 지정
줄 57: 줄 58:
     PreferredAuthentications publickey     PreferredAuthentications publickey
     IdentityFile ~/.ssh/[private key]     IdentityFile ~/.ssh/[private key]
 +    IdentitiesOnly yes
  
 # github.com git 계정 접속시에 대한 처리 # github.com git 계정 접속시에 대한 처리
줄 63: 줄 65:
     User git     User git
     IdentityFile ~/.ssh/[github private key]     IdentityFile ~/.ssh/[github private key]
 +    IdentitiesOnly yes
          
 # 동일 2차 도메인 사용시 # 동일 2차 도메인 사용시
줄 69: 줄 72:
     PreferredAuthentications publickey     PreferredAuthentications publickey
     IdentityFile ~/.ssh/[private key]     IdentityFile ~/.ssh/[private key]
 +    IdentitiesOnly yes
 </code> </code>
   * [[https://gist.github.com/jexchan/2351996|동일 HostName, 동일 User 다중 Key]] ''Host github.com-SSHID'' 에서 ''Host'' 의 값을 ''github.com-myid'' 형태로 특정 값을 줘서 처리할 수 있고, 그 뒤 부터 ssh ''github.com-myid'' 같은 호출이 정상 작동한다.   * [[https://gist.github.com/jexchan/2351996|동일 HostName, 동일 User 다중 Key]] ''Host github.com-SSHID'' 에서 ''Host'' 의 값을 ''github.com-myid'' 형태로 특정 값을 줘서 처리할 수 있고, 그 뒤 부터 ssh ''github.com-myid'' 같은 호출이 정상 작동한다.
     * [[https://stackoverflow.com/questions/7927750/specify-an-ssh-key-for-git-push-for-a-given-domain|Specify an SSH key for git push for a given domain - Stack Overflow]]     * [[https://stackoverflow.com/questions/7927750/specify-an-ssh-key-for-git-push-for-a-given-domain|Specify an SSH key for git push for a given domain - Stack Overflow]]
-    * [[https://serverfault.com/questions/450796/how-could-i-stop-ssh-offering-a-wrong-key/450807#450807|gitolite - How could I stop ssh offering a wrong key? - Server Fault]] ''IdentitiesOnly yes'' 설정도 주는게 좋다. 그렇지 않으면 우선 순위상에 있는 다른 키 파일들 뒤에 ''IdentityFile''에 설정한 파일이 뒤로 추가되는 형태로 시도된다.+    * [[https://serverfault.com/questions/450796/how-could-i-stop-ssh-offering-a-wrong-key/450807#450807|gitolite - How could I stop ssh offering a wrong key? - Server Fault]] ''IdentitiesOnly yes'' 설정도 주는게 좋다. 그렇지 않으면 우선 순위상에 있는 다른 키 파일들 뒤에 ''IdentityFile''에 설정한 파일이 뒤로 추가되는 형태로 시도된다.(''~/.ssh/id_dsa, ~/.ssh/id_rsa, 등이 더 우선된다)
  
 ===== 접속 유지 Keep connection ===== ===== 접속 유지 Keep connection =====
linux/ssh.txt · 마지막으로 수정됨: 2023/01/30 17:19 저자 kwon37xi