tip/linux 2019. 3. 14. 18:26

비밀번호 없이 ssh 접속

0. 서버에서 접속용 컴퓨터를 등록하는게 아닌, 접속용 컴퓨터에서 서버로 공개키를 전달하는 방식이므로

아래 과정은 접속용 컴퓨터에서 수행해야 함.

이 작업은 서버에 비밀번호 없이 접속시키고자 하는 컴퓨터마다 따로 해줘야 함.


1. 개인 공개키 생성. 

ssh-keygen -t rsa

(비밀번호를 '안쓰는게' 목적이니 그냥 엔터만 쳐서 넘어가면 됨)


2. 서버에 공개키 전달

ssh-copy-id -i ~/.ssh/id_rsa.pub [user]@[host]

(이때 host접속을 위해 사용하던 비밀번호를 한번 입력해주면 됨)

'tip > linux' 카테고리의 다른 글

sort in terminal using 'sort'  (0) 2019.06.07
renaming multiple files  (0) 2018.08.07
Collect each first rows in files and write to a file  (0) 2017.01.24
user add and remove in Ubuntu  (0) 2013.07.01
Install Intel compiler to ubuntu  (0) 2013.06.23