certutil import sshkey

Imports an SSH public key for a local SSH user from a remote host using the login credentials and path name.

Syntax

certutil import sshkey directory ssh_public_key_path file file-name host remote_ip_address login login_id password password source-ip source-ip user user_acct

Parameters

directory path
Specifies the path to the certificate on the remote host.
file filename
Specifies the SSH public key with a .pub extension.
host remote_ip
Specifies the IP address of the remote host.
login login_id
Specifies the login name in the remote host.
password password
Specifies the password to access the remote host.
source-ip source-ip
(SCP only) Specifies the source IP address to use in the header.
user user_acct
Specifies a local user name.

Modes

Privileged EXEC mode

Usage Guidelines

When using the password parameter with special characters (such as #$@`) use single or double-quotes around the password. Alternatively, precede the special characters by a backslash (\) character.

To delete a public key for a specific user, use to the no cerutil sshkey command.

Examples

The following example shows how to import an SSH public key for an SSH user named admin from a remote host (10.70.4.106). The command specifies the SSH public key directory on the remote host as well as login credentials to the remote host.

device# certutil import sshkey user admin host 10.70.4.106 directory /users/home40/bmeenaks/.ssh file id_rsa.pub login fvt password pass1

The following example demonstrates the use of special characters in a password.

device# certutil import ssh host 192.168.10.10 dir /home/brcd1/.ssh file id_rsa.pub user admin login brcd1 pass Abcde\! login brcd1 pass "Abcde!"