代码仓
中
ipmcset -t user -d addpublickey
更新时间: 2026/07/28
在AtomGit上查看源码

Back to Overview

Command Function ​

Add SSH public key

Command Format ​

ipmcset -t user -d addpublickey -v <username> <localpath/URL>

Command type ​

ipmcset

Parameters ​

NameTypeRequiredDefaultConstraintDescription
usernamestringYes-RegexContain any digits, letters, or characters except (:,&lt;>&"'/%) and space. User name's length is limitted to 1-16. User name cannot start with character "#" "+" or "-". User name cannot be just a dot (.) or two consecutive dots (..).
localpathstringYes--e.g.: /tmp/config.xml URL : protocol://[username:password@]IP[:port]/directory/filename The parameters in the URL are described as follows: The protocol must be https,sftp,cifs,scp or nfs. The URL can contain only letters, digits, and special characters. The directory or file name cannot contain @. Use double quotation marks (") to enclose the URL that contains a space or double quotation marks ("). Escape the double quotation marks (") and back slash () contained in the URL. For example, if you want to enter: a b\cd" Enter: "a b\cd""

Regex正则表达式 ​

  • username
^(?!.*[<>&,'/\%:" ])(?=[A-Za-z0-9`~!@#$%^&*()_+-=&#123;&#125;;[\]?.|])(?!#)(?!\+)(?!-)([A-Za-z0-9`~!@#$%^&*()_+-={};[\]?.|]{1,16})$

Output Examples ​

Add user public key successfully.
Downloading...
Add user public key successfully

Config source ​

interface_config/cli/ipmcset/user.json