以下命令更改私钥的验证机制(即口令短语),而不更改实际的私钥。有关更多信息,请参见 ssh-keygen(1) 手册页。
键入带 –p 选项的 ssh-keygen 命令,并回答提示。
mySystem% ssh-keygen -p Enter file which contains the private key (/home/username/.ssh/id_rsa):<Press Return> Enter passphrase (empty for no passphrase): <Type passphrase> Enter same passphrase again: <Type passphrase>
其中,–p 用于请求更改私钥文件的口令短语。