Transfer / Client / import_ssh_public_key
import_ssh_public_key#
- Transfer.Client.import_ssh_public_key(**kwargs)#
Adds a Secure Shell (SSH) public key to a Transfer Family user identified by a
UserName
value assigned to the specific file transfer protocol-enabled server, identified byServerId
.The response returns the
UserName
value, theServerId
value, and the name of theSshPublicKeyId
.See also: AWS API Documentation
Request Syntax
response = client.import_ssh_public_key( ServerId='string', SshPublicKeyBody='string', UserName='string' )
- Parameters:
ServerId (string) –
[REQUIRED]
A system-assigned unique identifier for a server.
SshPublicKeyBody (string) –
[REQUIRED]
The public key portion of an SSH key pair.
Transfer Family accepts RSA, ECDSA, and ED25519 keys.
UserName (string) –
[REQUIRED]
The name of the Transfer Family user that is assigned to one or more servers.
- Return type:
dict
- Returns:
Response Syntax
{ 'ServerId': 'string', 'SshPublicKeyId': 'string', 'UserName': 'string' }
Response Structure
(dict) –
Identifies the user, the server they belong to, and the identifier of the SSH public key associated with that user. A user can have more than one key on each server that they are associated with.
ServerId (string) –
A system-assigned unique identifier for a server.
SshPublicKeyId (string) –
The name given to a public key by the system that was imported.
UserName (string) –
A user name assigned to the
ServerID
value that you specified.
Exceptions