문서의 선택한 두 판 사이의 차이를 보여줍니다.
양쪽 이전 판 이전 판 다음 판 | 이전 판 다음 판 양쪽 다음 판 | ||
linux:ssh [2017/04/26 10:57] kwon37xi [접속 유지 Keep connection] |
linux:ssh [2019/11/13 22:59] kwon37xi [~/.ssh/config] |
||
---|---|---|---|
줄 5: | 줄 5: | ||
* [[http:// | * [[http:// | ||
* [[http:// | * [[http:// | ||
+ | * [[linux: | ||
+ | * [[linux: | ||
===== Private Key 생성 ===== | ===== Private Key 생성 ===== | ||
줄 13: | 줄 15: | ||
* '' | * '' | ||
* '' | * '' | ||
- | * '' | + | * '' |
+ | chmod 700 ~/.ssh | ||
+ | </ | ||
===== ssh-agent ===== | ===== ssh-agent ===== | ||
줄 23: | 줄 27: | ||
</ | </ | ||
* 키 등록이 안 될 경우 키 파일의 권한이 **0600**이 맞는지 확인 해 본다. | * 키 등록이 안 될 경우 키 파일의 권한이 **0600**이 맞는지 확인 해 본다. | ||
+ | |||
+ | <code sh> | ||
+ | chmod 600 ~/ | ||
+ | </ | ||
+ | * [[https:// | ||
===== SSH 접속 인사 텍스트 ===== | ===== SSH 접속 인사 텍스트 ===== | ||
* ''/ | * ''/ | ||
+ | * 그런데 '' | ||
+ | * 따라서 '' | ||
===== ~/ | ===== ~/ | ||
줄 32: | 줄 42: | ||
* [[http:// | * [[http:// | ||
* [[http:// | * [[http:// | ||
+ | * 파일 권한< | ||
+ | chmod 600 ~/ | ||
+ | </ | ||
* '' | * '' | ||
# 기본형태. ~/ | # 기본형태. ~/ | ||
줄 47: | 줄 60: | ||
# github.com git 계정 접속시에 대한 처리 | # github.com git 계정 접속시에 대한 처리 | ||
Host github.com | Host github.com | ||
+ | HostName github.com | ||
User git | User git | ||
IdentityFile ~/ | IdentityFile ~/ | ||
줄 56: | 줄 70: | ||
IdentityFile ~/ | IdentityFile ~/ | ||
</ | </ | ||
+ | * [[https:// | ||
===== 접속 유지 Keep connection ===== | ===== 접속 유지 Keep connection ===== | ||
줄 74: | 줄 89: | ||
chmod 600 ~/ | chmod 600 ~/ | ||
</ | </ | ||
- | * ssh 데몬 재시작 | + | * ssh 데몬 재시작<code sh> |
+ | sudo service ssh restart | ||
+ | </ | ||
+ | |||
+ | 혹은 명령행 옵션을 직접 줘도 됨 | ||
+ | |||
+ | <code sh> | ||
+ | ssh -o ServerAliveInterval=60 hostname | ||
+ | </ | ||
===== Text 파일 Gzip 압축 전송 : 다른 서버의 파일을 현재 서버로 전송 ===== | ===== Text 파일 Gzip 압축 전송 : 다른 서버의 파일을 현재 서버로 전송 ===== | ||
줄 120: | 줄 143: | ||
</ | </ | ||
+ | |||
+ | ===== known_hosts 에 미리 호스트 추가 ===== | ||
+ | [[http:// | ||
+ | <code sh> | ||
+ | ssh-keyscan -t rsa host명 >> ~/ | ||
+ | ssh-keyscan -t rsa -f host명들 이들어있는 파일명 >> ~/ | ||
+ | </ | ||
+ | |||
+ | ===== no matching cipher found. ===== | ||
+ | 아래와 같은 오류 발생시.. | ||
+ | |||
+ | >> no matching cipher found. Their offer: aes128-cbc, | ||
+ | |||
+ | '' | ||
+ | < | ||
+ | Ciphers aes128-cbc, | ||
+ | # 필요한 경우 | ||
+ | KexAlgorithms +diffie-hellman-group1-sha1 | ||
+ | </ | ||
+ | |||
+ | 혹은 명령행에 암호화 방식을 '' | ||
+ | |||
+ | <code sh> | ||
+ | ssh -c aes128-cbc kwon37xi@xxx.xx.xx.xx | ||
+ | </ | ||