IT Curation 자세히보기

카테고리 없음

centOS_ssh원격접속[cent To cent]

icf_ 2022. 8. 31. 17:51

①xshell → 서버 user2 전자서명로그인

② client user2 → 서버 user2 전자서명로그인

 

◇ Svr_setting[192.168.111.10]

root# vim /etc/ssh/sshd_config [enter]

PasswordAuthentication yes [save]

root# systemctl restart sshd

 

 Client_setting[192.168.111.11]

root# useradd user2

root# passwd user2

{생략가능 keygen실행하면 자동으로됨.

root# mkdir ~user2/.ssh

root# touch ~user2/.ssh/authorized_keys

root# chown -R user2:user2 ~user2/.ssh

root# chmod 700 ~user2/.ssh

root# chmod 600 ~user2/.ssh/authorized_keys

}

root# su - user2

user2$ ssh-keygen -t rsa

user2$ ssh-copy-id -i ~user2/.ssh/id_rsa user2@192.168.111.10

user2$ ssh -i ~user2/.ssh/id_rsa user2@192.168.111.10

728x90