ssh client authentication server

Syntax

ssh client authentication server server assign publickey keyname

undo ssh client authentication server server assign publickey

View

System view

Default level

2: System level

Parameters

server: Specifies an IP address or name of the server, a string of 1 to 80 characters.

assign publickey keyname: Specifies the name of the host public key of the server, a string of 1 to 64 characters.

Description

Use ssh client authentication server on a client to configure the host public key of a server so that the client can determine whether the server is trustworthy.

Use undo ssh client authentication server to remove the configuration.

By default, the host public key of the server is not configured, and when logging into the server, the client uses the IP address or host name used for login as the public key name.

A client that does not support first-time authentication rejects unauthenticated servers. To enable the client to use the correct public key of a server to authenticate the server, you must configure the public keys of the servers and specify the mappings between public keys and servers on the client.

The specified host public key of the server must already exist.

Related commands: ssh client first-time enable.

Examples

# Configure the public key of the server with the IP address of 192.168.0.1 to be key1.

<Sysname> system-view
[Sysname] ssh client authentication server 192.168.0.1 assign publickey key1