SSHAccept Parameter (Connect-SCP Cmdlet)
The hex-encoded fingerprint of the host to trust explicitly.
Connect-SCP -SSHAccept string
The fingerprint will be an MD5 hash of the host key in hex-encoded form, i.e. "0a:1b:2c:3d". Setting this will instruct the cmdlet to trust the fingerprint provided without prompting for verification.
After each connection, regardless of whether or not the key was trusted, the cmdlet will store the server's host key in the $SSHServerHostKey session variable. This variable can be inspected to view details of the server's key.
If the Force parameter is set, the cmdlet will accept the server's key unconditionally.
In cases where the host key presented by the server is not trusted, a prompt will be shown to the user. This prompt will allow the user to decide whether or not they would like to accept the host key presented by the server.
There may be cases where you do not want a prompt to be displayed or would like to handle the response supplied directly within your script. This can be done by setting the $SSHAcceptPreference variable prior to running the cmdlet. The available values for this variable are:
|None (default)||Maintains the default behavior. If the host key is not trusted by default, the user will be prompted.|
|Accept||Accepts the host key without prompting the user, even if it is not trusted by default.|
|Reject||Rejects the host key without prompting the user only if it is not trusted by default. Thus if the host key is found to be trusted or the Force parameter is set, the connection will still be accepted.|