프로그래밍/System
리눅스 서버에 SSH 접속하기
DEV LION
2015. 11. 25. 23:24
1. 윈도우 클라이언트에 putty 설치
> http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
2. 서버에 ssh 설치하기
> sudo apt-get install openssh-client
> sudo apt-get install openssh-server
> sudo /etc/init.d/ssh restart
3. 암호 설정
1) 암호로 ssh 접속하기
> sudo passwd root
여기서 설정한 암호와 비밀번호로 ssh에 접속하면 된다.
2) 암호없이 ssh 접속하기
(1) 키를 생성한다.
> ssh-keygen
Generating public/private rsa key pair. to make sure we haven't added extra keys that you weren't expecting. |
(2) 키를 확인한다.
> ls -al ~/.ssh/
id_rsa : 개인키(비밀키)
id_rsa.pub : 공개키 - 접속하려는 클라이언트의 authorized_keys에 입력한다.
5. putty로 접속하기
반응형