Author Topic: generate ssh-key with rsa algorithm on mac os  (Read 8625 times)

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2145
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
generate ssh-key with rsa algorithm on mac os
« on: พฤษภาคม 29, 2015, 04:56:19 PM »
##generate rsa-public-key at client PC with 2048 bit.

#ssh-keygen -t rsa -b 2048

Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.

#less /root/.ssh/id_rsa.pub

add to SSH-SERVER as
#vi /home/user/.ssh/authorized_keys
ssh-rsa yourkey

Then test login with
#ssh ssh_server_ip -luser