このスクリプトでokがでたら、ペアになってます。
% if [[ `ssh-keygen -y -f ~/.ssh/id_rsa | cut -d " " -f 2` == `cat ~/.ssh/id_rsa.pub | cut -d " " -f 2` ]]; then echo ok; fi
ok
※ 参考文献
- https://qiita.com/ironsand/items/27170fb73971b0522cbf
このスクリプトでokがでたら、ペアになってます。
% if [[ `ssh-keygen -y -f ~/.ssh/id_rsa | cut -d " " -f 2` == `cat ~/.ssh/id_rsa.pub | cut -d " " -f 2` ]]; then echo ok; fi
ok
※ 参考文献
- https://qiita.com/ironsand/items/27170fb73971b0522cbf