어떤 서버들은 ssh로 접속할 때 기본 포트 22번이 막혀있다. (보안상 이유 등으로..)
그러면 ssh -p <port\_number> <username>@<host> 처럼 -p 옵션을 줘서 접속해야하는데, 포트 번호를 기억하기도 어렵고 귀찮다.
이럴 때 .ssh/config 파일에 호스트별로 ssh 접속포트를 지정해두면 ssh <host>만으로 접속할 수 있다.
// .ssh/config
Host <your-host>
HostName <your-hostname>
Port <your-port>
User <username>
참고: https://nerderati.com/2011/03/17/simplify-your-life-with-an-ssh-config-file/
'Programming General' 카테고리의 다른 글
[Udacity] Networking for Web Developers (0) | 2020.06.01 |
---|---|
Concurrency vs Parallelism (0) | 2020.01.12 |