문서의 선택한 두 판 사이의 차이를 보여줍니다.
양쪽 이전 판 이전 판 다음 판 | 이전 판 다음 판 양쪽 다음 판 | ||
linux:ssh [2019/11/13 22:55] kwon37xi [Private Key 생성] |
linux:ssh [2021/04/07 20:57] kwon37xi |
||
---|---|---|---|
줄 5: | 줄 5: | ||
* [[http:// | * [[http:// | ||
* [[http:// | * [[http:// | ||
+ | * [[linux: | ||
* [[linux: | * [[linux: | ||
* [[linux: | * [[linux: | ||
줄 10: | 줄 11: | ||
===== Private Key 생성 ===== | ===== Private Key 생성 ===== | ||
<code sh> | <code sh> | ||
- | ssh-keygen -t rsa | + | ssh-keygen -t rsa -b 4096 -m pem -C " |
</ | </ | ||
* Passphrase를 항상 넣는 것이 좋다. | * Passphrase를 항상 넣는 것이 좋다. | ||
* '' | * '' | ||
* '' | * '' | ||
+ | * [[git: | ||
+ | * '' | ||
+ | * [[: | ||
* '' | * '' | ||
chmod 700 ~/.ssh | chmod 700 ~/.ssh | ||
줄 50: | 줄 54: | ||
HostName IP 혹은 hostname | HostName IP 혹은 hostname | ||
User 계정명 | User 계정명 | ||
+ | IdentitiesOnly yes | ||
# 특정 key 지정 | # 특정 key 지정 | ||
줄 57: | 줄 62: | ||
PreferredAuthentications publickey | PreferredAuthentications publickey | ||
IdentityFile ~/ | IdentityFile ~/ | ||
+ | IdentitiesOnly yes | ||
# github.com git 계정 접속시에 대한 처리 | # github.com git 계정 접속시에 대한 처리 | ||
Host github.com | Host github.com | ||
+ | HostName github.com | ||
User git | User git | ||
IdentityFile ~/ | IdentityFile ~/ | ||
+ | IdentitiesOnly yes | ||
| | ||
# 동일 2차 도메인 사용시 | # 동일 2차 도메인 사용시 | ||
줄 68: | 줄 76: | ||
PreferredAuthentications publickey | PreferredAuthentications publickey | ||
IdentityFile ~/ | IdentityFile ~/ | ||
+ | IdentitiesOnly yes | ||
</ | </ | ||
* [[https:// | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
===== 접속 유지 Keep connection ===== | ===== 접속 유지 Keep connection ===== | ||
줄 155: | 줄 166: | ||
>> no matching cipher found. Their offer: aes128-cbc, | >> no matching cipher found. Their offer: aes128-cbc, | ||
- | '' | + | 혹은 |
+ | >> no matching key exchange method found. Their offer: diffie-hellman-group-exchange-sha1, | ||
+ | |||
+ | |||
+ | '' | ||
< | < | ||
Ciphers aes128-cbc, | Ciphers aes128-cbc, | ||
# 필요한 경우 | # 필요한 경우 | ||
KexAlgorithms +diffie-hellman-group1-sha1 | KexAlgorithms +diffie-hellman-group1-sha1 | ||
+ | |||
+ | # Host 를 명시해서 설정하는게 나음 | ||
+ | Host 123.123.123.123 | ||
+ | KexAlgorithms +diffie-hellman-group1-sha1 | ||
</ | </ | ||
줄 167: | 줄 186: | ||
ssh -c aes128-cbc kwon37xi@xxx.xx.xx.xx | ssh -c aes128-cbc kwon37xi@xxx.xx.xx.xx | ||
</ | </ | ||
+ | |||