1、生成秘鑰
需要在你自己電腦上生成
執行下面命令,默認生成位置是~/.ssh
ssh-keygen -t rsa -b 1024 -f yourkeyname -C "備注"
參數解釋
-b 采用長度1024bit的密鑰對,b=bits,最長4096,不過沒啥必要
-t rsa 采用rsa加密方式,t=type
-f 生成文件名,f=output_keyfiles
-C 備注,C=comment
2、公鑰轉換
鍵入以下命令:
ssh-keygen -e -m pem -f ~/.ssh/id_rsa.pub | egrep -v "BEGIN|END" | base64 -d | od -t x1 -An -w4 | tr 'a-f' 'A-F' | tr -d ' ' | fmt -w 48

3、交換機上配置

