Send-SCP Cmdlet
Parameters Output Objects Config Settings
The Send-SCP component is used to upload files to SCP enabled SSH servers.
Syntax
Send-SCP [parameters]
Remarks
Send-SCP can be used to upload files to a SSH server using SCP.
The cmdlets support pipeline input for some of their parameters. Prebuilding an object and piping it to the cmdlet is very useful, but should be used with caution to prevent security conflicts. Steps have been taken to decrease the risk of a possibly accidental pipe to the cmdlet, for instance, the Credential parameter cannot be piped to the cmdlet and must be specified manually.
# Send file.txt file an SSH server
Send-SCP -Server scp_server -User user -Password password -LocalFile Folder1/SubFolder/file.txt -RemoteFile /dir1/file.txt
Connection Handling
This cmdlet supports persistent connections through the Connection parameter. To establish a new SCP connection, use the Connect-SCP cmdlet. To close the connection, use the Disconnect-SCP cmdlet.
Parameter List
The following is the full list of the parameters of the cmdlet with short descriptions. Click on the links for further details.
Connection | An already established connection. |
LogFile | The location of a file to which debug information is written. |
AuthMode | The type of authentication used by the component. |
CertPassword | The password to the certificate store. |
CertStore | The name of the certificate store for the client certificate. |
CertStoreType | The type of certificate store for the client certificate. |
CertSubject | The subject of the certificate used for client authentication. |
CompressionAlgorithms | A comma-separated list containing all allowable compression algorithms. |
Config | Specifies one or more configuration settings. |
Credential | The PSCredential object to use for user/password authentication. |
FirewallHost | Name or IP address of firewall. |
FirewallPassword | A password if authentication is to be used when connecting through the firewall. |
FirewallPort | The port of the firewall to which to connect. |
FirewallType | Determines the type of firewall to connect through. |
FirewallUser | A user name if authentication is to be used connecting through a firewall. |
Force | Forces the component to accept the default behavior instead of querying the user. |
LocalFile | The local file to upload. |
LocalIP | The IP address of the local interface to use. |
LogFile | The location of a file to which debug information is written. |
Password | The password to use for authentication. |
PasswordPrompt | The shell prompt used for keyboard-interactive authentication. |
Port | The TCP port in the remote host to which to connect. |
RemoteFile | The remote file to save to. |
Server | The address of the Server. |
SSHAccept | The hex-encoded fingerprint of the host to trust explicitly. |
Timeout | The maximum time allowed for the operation. |
User | The username to use for authentication. |
Output Objects
The following is the full list of the output objects returned by the cmdlet with short descriptions. Click on the links for further details.
SCPFile | This object is created after a file has finished transferring. |
Config Settings
The following is a list of config settings for the cmdlet with short descriptions. Click on the links for further details.
ChannelDataEOL[ChannelId] | Used to break the incoming data stream into chunks. |
ChannelDataEOLFound[ChannelId] | Determines if ChannelDataEOL was found. |
ClientSSHVersionString | The SSH version string used by the component. |
EnablePageantAuth | Whether to use a key stored in Pageant to perform client authentication. |
KerberosDelegation | If true, asks for credentials with delegation enabled during authentication. |
KerberosRealm | The fully qualified domain name of the Kerberos Realm to use for GSSAPI authentication. |
KerberosSPN | The Kerberos Service Principal Name of the SSH host. |
KeyRenegotiationThreshold | Sets the threshold for the SSH Key Renegotiation. |
LogLevel | Specifies the level of detail that is logged. |
MaxChannelDataLength[ChannelId] | The maximum amount of data to accumulate when no ChannelDataEOL is found. |
MaxPacketSize | The maximum packet size of the channel, in bytes. |
MaxWindowSize | The maximum window size allowed for the channel, in bytes. |
PasswordPrompt | The text of the password prompt used in keyboard-interactive authentication. |
PreferredDHGroupBits | The size (in bits) of the preferred modulus (p) to request from the server. |
RecordLength | The length of received data records. |
ServerSSHVersionString | The remote host's SSH version string. |
SignedSSHCert | The CA signed client public key used when authenticating. |
SSHAcceptAnyServerHostKey | If set the component will accept any key presented by the server. |
SSHAcceptServerCAKey | The CA public key that signed the server's host key. |
SSHAcceptServerHostKeyFingerPrint | The fingerprint of the server key to accept. |
SSHFingerprintHashAlgorithm | The algorithm used to calculate the fingerprint. |
SSHFingerprintMD5 | The server hostkey's MD5 fingerprint. |
SSHFingerprintSHA1 | The server hostkey's SHA1 fingerprint. |
SSHFingerprintSHA256 | The server hostkey's SHA256 fingerprint. |
SSHKeepAliveCountMax | The maximum number of keep alive packets to send without a response. |
SSHKeepAliveInterval | The interval between keep alive packets. |
SSHKeyExchangeAlgorithms | Specifies the supported key exchange algorithms. |
SSHKeyRenegotiate | Causes the component to renegotiate the SSH keys. |
SSHMacAlgorithms | Specifies the supported Mac algorithms. |
SSHPubKeyAuthSigAlgorithms | Specifies the enabled signature algorithms that may be used when attempting public key authentication. |
SSHPublicKeyAlgorithms | Specifies the supported public key algorithms for the server's public key. |
SSHVersionPattern | The pattern used to match the remote host's version string. |
TryAllAvailableAuthMethods | If set to true, the component will try all available authentication methods. |
UseStrictKeyExchange | Specifies how strict key exchange is supported. |
WaitForChannelClose | Whether to wait for channels to be closed before disconnected. |
WaitForServerDisconnect | Whether to wait for the server to close the connection. |
ConnectionTimeout | Sets a separate timeout value for establishing a connection. |
FirewallAutoDetect | Tells the component whether or not to automatically detect and use firewall system settings, if available. |
FirewallHost | Name or IP address of firewall (optional). |
FirewallPassword | Password to be used if authentication is to be used when connecting through the firewall. |
FirewallPort | The TCP port for the FirewallHost;. |
FirewallType | Determines the type of firewall to connect through. |
FirewallUser | A user name if authentication is to be used connecting through a firewall. |
KeepAliveInterval | The retry interval, in milliseconds, to be used when a TCP keep-alive packet is sent and no response is received. |
KeepAliveTime | The inactivity time in milliseconds before a TCP keep-alive packet is sent. |
Linger | When set to True, connections are terminated gracefully. |
LingerTime | Time in seconds to have the connection linger. |
LocalHost | The name of the local host through which connections are initiated or accepted. |
LocalPort | The port in the local host where the component binds. |
MaxLineLength | The maximum amount of data to accumulate when no EOL is found. |
MaxTransferRate | The transfer rate limit in bytes per second. |
ProxyExceptionsList | A semicolon separated list of hosts and IPs to bypass when using a proxy. |
TCPKeepAlive | Determines whether or not the keep alive socket option is enabled. |
TcpNoDelay | Whether or not to delay when sending packets. |
UseIPv6 | Whether to use IPv6. |
AbsoluteTimeout | Determines whether timeouts are inactivity timeouts or absolute timeouts. |
FirewallData | Used to send extra data to the firewall. |
InBufferSize | The size in bytes of the incoming queue of the socket. |
OutBufferSize | The size in bytes of the outgoing queue of the socket. |
BuildInfo | Information about the product's build. |
CodePage | The system code page used for Unicode to Multibyte translations. |
LicenseInfo | Information about the current license. |
MaskSensitive | Whether sensitive data is masked in log messages. |
UseInternalSecurityAPI | Tells the component whether or not to use the system security libraries or an internal implementation. |
LogFile Parameter (Send-SCP Cmdlet)
The location of a file to which debug information is written.
Syntax
Send-SCP -LogFile string
Remarks
When specified, the cmdlet will log debug information to the file. If the file exists, the information will be appended.Default Value
null
Connection Parameter (Send-SCP Cmdlet)
An existing SCP connection.
Syntax
Send-SCP -Connection SCPConnection
Remarks
Represents an existing, persistent SCP connection to be used. After this cmdlet executes, the connection will remain opened to be used in an another call. New connections can be established using the Connect-SCP cmdlet and closed using the Disconnect-SCP cmdlet.Default Value
null
AuthMode Property (Send-SCP Cmdlet)
The type of authentication used by the component.
Syntax
Send-SCP -AuthMode string
Remarks
Normally, the cmdlet will attempt to log in to the SSH server and authenticate via username and password. This behavior can be changed to use client key (RSA) authentication by setting this parameter to 'PublicKey'.
Password (default) | Password authentication used with the SSH server. |
PublicKey | When Public Key authentication is used, the cmdlet will search the certificate store specified in CertStore for a private key associated with CertSubject when logging onto the SSH server. This private key is used to verify the client's identity during the user authentication phase of the SSH logon process. |
KeyboardInteractive | When KeyboardInteractive authentication is used, the cmdlet will wait for the server to prompt for the password using PasswordPrompt and supply the value of the Password property. This should not be confused with Password authentication. |
GSSAPIWithMic | This allows the cmdlet to attempt Kerberos authentication using the GSSAPI-WITH-MIC scheme. The client will try Kerberos authentication using the value of User (single sign-on), or if Password is specified as well, it will try Kerberos authentication with alternate credentials. |
MultiFactor | This allows the cmdlet to attempt a multi-step authentication process. The cmdlet will send authentication data to the server based on the list of methods allowed for the current user and the authentication property values supplied. |
Default Value
2
CertPassword Property (Send-SCP Cmdlet)
The password to the certificate store.
Syntax
Send-SCP -CertPassword string
Remarks
Specifies a password (if required) to access the specified certificate store.
Default Value
""
Parameter Alias
CertificatePassword
CertStore Property (Send-SCP Cmdlet)
The name of the certificate store for the client certificate.
Syntax
Send-SCP -CertStore string
Remarks
The CertStoreType parameter specifies the type of the certificate store specified by CertStore. If the store is password protected, specify the password in CertPassword.
CertStore is used in conjunction with the CertSubject parameter in order to specify client certificates. If CertStore has a value, and CertSubject has been set, a search for a certificate is initiated during logon. Please refer to the CertSubject parameter for details.
Designations of certificate stores are platform-dependent.
The following are designations of the most common User and Machine certificate stores in Windows:
MY | A certificate store holding personal certificates with their associated private keys. |
CA | Certifying authority certificates. |
ROOT | Root certificates. |
SPC | Software publisher certificates. |
When the certificate store type is PFXFile, this parameter must be set to the name of the file.
Default Value
"MY"
Parameter Alias
CertificateStore
CertStoreType Property (Send-SCP Cmdlet)
The type of certificate store for the client certificate.
Syntax
Send-SCP -CertStoreType string
Remarks
This parameter can take one of the following values:
User (default) | This specifies that the certificate store is owned by the current user (these are the user's registry certificate stores such as MY, CA, etc.). |
Machine | The certificate store is a machine store. |
PFXFile | The certificate store is the name of a PFX (PKCS12) file containing certificates. |
PFXBlob | The certificate store is a string (base64 encoded) representing a certificate store in PFX (PKCS12) format. You should use this option if storing a pfx file's content in a shell variable. |
PEMKeyFile | The certificate store is the name of a file that contains a PEM encoded certificate and private key. |
PEMKeyBlob | The certificate store is a string that contains a PEM encoded certificate and private key. |
P7BFile | The certificate store is the name of a file that contains P7B encoded certificates. |
SSHPublicKeyFile | The certificate store is the name of a file that contains an SSH-style public key. |
PPKFile | The certificate store is the name of a file that contains a PPK (PuTTY Private Key). |
PPKBlob | The certificate store is a string (binary) that contains a PPK (PuTTY Private Key). |
Default Value
0
CertSubject Property (Send-SCP Cmdlet)
The subject of the certificate used for client authentication.
Syntax
Send-SCP -CertSubject string
Remarks
During the user authentication phase of the logon process, the cmdlet will search the store specified in CertStore for a certificate that matches this parameter. If the store contains a private key for that certificate, it is used to verify the user's identity with the secure server.
When this parameter is set, a search is performed in the current certificate store certificate with matching subject.
If an exact match is not found, the store is searched for subjects containing the value of the parameter.
When setting the parameter to a partial subject, CN= should be omitted. For example, the following code would find the certificate with subject CN=Test Certificate, OU=People, C=US
Example (Searching with partial subject)
-certsubject "Test"
If a match is not found, the parameter is set to an empty string, and no certificate is selected.
The special value "*" picks a random certificate in the certificate store.
Default Value
"*"
CompressionAlgorithms Property (Send-SCP Cmdlet)
A comma-separated list containing all allowable compression algorithms.
Syntax
Send-SCP -CompressionAlgorithms string
Remarks
During the SSH handshake, this list will be used to negotiate the compression algorithm to be used between the client and server. This list is used for both directions: client to server and server to client. When negotiating algorithms, each side sends a list of all algorithms it supports or allows. The algorithm chosen for each direction is the first algorithm to appear in the sender's list that the receiver supports, so it is important to list multiple algorithms in preferential order. If no algorithm can be agreed upon, the cmdlet will raise an error and the connection will be aborted.
At least one support algorithm must appear in this list. The following compression algorithms are supported by the cmdlet:
- zlib
- zlib@openssh.com
- none
Default Value
"none"
Config Property (Send-SCP Cmdlet)
Specifies one or more configuration settings.
Syntax
Send-SCP -Config string[]
Remarks
The Config parameter takes one or more name-value pairs that represent the name of the configuration setting and value, i.e.: -config "Name=Value"
Default Value
null
Credential Property (Send-SCP Cmdlet)
The PSCredential object to use for user/password authentication.
Syntax
Send-SCP -Credential PSCredential
Remarks
Every cmdlet that supports user authentication will expose a Credential parameter. A PSCredential object should be specified for this parameter. Alternatively, the User and Password parameters can be set to represent the credential information.
If the cmdlet supports client key authentication it uses the password field of this object for the certificate's password. This setting is enabled by using public key authentication. Note: Due to security reasons, it is recommended that you use the Credential parameter rather than User and Password to specify the authentication information.
Default Value
null
Parameter Position
1
Parameter Alias
auth
FirewallHost Property (Send-SCP Cmdlet)
Name or IP address of firewall.
Syntax
Send-SCP -FirewallHost string
Remarks
If a FirewallHost is given, requested connections will be authenticated through the specified firewall when connecting.
If the FirewallHost parameter is set to a Domain Name, a DNS request is initiated. Upon successful termination of the request, the FirewallHost parameter is set to the corresponding address. If the search is not successful, an error is returned.
Default Value
""
FirewallPassword Property (Send-SCP Cmdlet)
A password if authentication is to be used when connecting through the firewall.
Syntax
Send-SCP -FirewallPassword string
Remarks
If FirewallHost is specified, the FirewallUser and FirewallPassword properties are used to authenticate against the firewall.
Default Value
""
FirewallPort Property (Send-SCP Cmdlet)
The port of the firewall to which to connect.
Syntax
Send-SCP -FirewallPort int
Remarks
The TCP port for the FirewallHost. See the description of the FirewallHost parameter for details.
Note that the FirewallPort is set automatically when FirewallType is set to a valid value. See the description of the FirewallType parameter for details. Setting this parameter will overwrite the default settings for the firewall port as specified by FirewallType.
Default Value
0
FirewallType Property (Send-SCP Cmdlet)
Determines the type of firewall to connect through.
Syntax
Send-SCP -FirewallType string
Remarks
The applicable values are the following:
None | No firewall (default setting). |
Tunnel | Connect through a tunneling proxy. FirewallPort is set to 80. |
SOCKS4 | Connect through a SOCKS4 Proxy. FirewallPort is set to 1080. |
SOCKS5 | Connect through a SOCKS5 Proxy. FirewallPort is set to 1080. |
Default Value
0
FirewallUser Property (Send-SCP Cmdlet)
A user name if authentication is to be used connecting through a firewall.
Syntax
Send-SCP -FirewallUser string
Remarks
If FirewallHost is specified, the FirewallUser and FirewallPassword properties are used to authenticate against the firewall.
Default Value
""
Force Property (Send-SCP Cmdlet)
Forces the component to accept the default behavior instead of querying the user.
Syntax
Send-SCP -Force SwitchParameter
Remarks
The Force parameter is especially useful in a script environment where user interaction is not an option. Certain cmdlets that are SSH and SSL based will query the user if the security credentials of the certificate presented by the server are not met. Setting this parameter will force the cmdlet to accept the certificate of the server unconditionally.
Default Value
false
LocalFile Property (Send-SCP Cmdlet)
The local file to upload.
Syntax
Send-SCP -LocalFile string
Remarks
LocalFile contains the path of the filename on your machine that is to be uploaded to the Server. RemoteFile specifies the path and filename that LocalFile will be saved to on the Server.
Default Value
""
Parameter Position
1
Parameter Alias
Upload
LocalIP Property (Send-SCP Cmdlet)
The IP address of the local interface to use.
Syntax
Send-SCP -LocalIP string
Remarks
This parameter is useful when the cmdlet is running on a machine that has more than one network interface (each with its own IP address and network access privileges).
Default Value
""
Parameter Alias
LocalAddress
LogFile Property (Send-SCP Cmdlet)
The location of a file to which debug information is written.
Syntax
Send-SCP -LogFile string
Remarks
When specified, the cmdlet will log debug information to the file. If the file exists, the information will be appended.
Default Value
""
Password Property (Send-SCP Cmdlet)
The password to use for authentication.
Syntax
Send-SCP -Password string
Remarks
Every time User, or Password are set, the cmdlet will authenticate with the server. It is recommended that the Credential parameter is set instead of User/Password because of security reasons. If both Credential and this parameter is set, the Credential value is used.
Default Value
""
PasswordPrompt Property (Send-SCP Cmdlet)
The shell prompt used for keyboard-interactive authentication.
Syntax
Send-SCP -PasswordPrompt string
Remarks
If AuthMode is set to Keyboard-Interactive, the shell's password prompt must be specified in PasswordPrompt. At connection, the cmdlet will wait for the PasswordPrompt and provide the Password when it is received.
Default Value
"password"
Port Property (Send-SCP Cmdlet)
The TCP port in the remote host to which to connect.
Syntax
Send-SCP -Port int
Remarks
Port specifies a service port on the remote host to which to connect.
A valid port number (a value between 1 and 65535) is required for the connection to take place.
Default Value
22
RemoteFile Property (Send-SCP Cmdlet)
The remote file to save to.
Syntax
Send-SCP -RemoteFile string
Remarks
RemoteFile is the name of the file on the server to which the LocalFile will be saved. It is either an absolute file path, or a relative path based on the servers current path.
To use the existing filename specified by LocalFile, set RemoteFile to an absolute or relative path ending with a "/". For instance:
send-scp -server TestServer -user test -password test -remotefile MyFolder/MySubFolder/ -localfile c:\MyFile.txt
The above code will upload a file called "MyFile.txt" to "MyFolder/MySubFolder" on the server.
Default Value
""
Server Property (Send-SCP Cmdlet)
The address of the Server.
Syntax
Send-SCP -Server string
Remarks
The cmdlet requires a server address to be provided. Either an IP address or the server host name can be provided.
Default Value
""
Parameter Position
0
This is a required parameter.
SSHAccept Property (Send-SCP Cmdlet)
The hex-encoded fingerprint of the host to trust explicitly.
Syntax
Send-SCP -SSHAccept string
Remarks
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. |
Default Value
""
Parameter Alias
Fingerprint
Timeout Property (Send-SCP Cmdlet)
The maximum time allowed for the operation.
Syntax
Send-SCP -Timeout int
Remarks
After the specified interval in seconds, the cmdlet will throw a Timeout error if the operation is not completed.
Default Value
10
User Property (Send-SCP Cmdlet)
The username to use for authentication.
Syntax
Send-SCP -User string
Remarks
Every time User and Password are set, the cmdlet will authenticate with the server. It is recommended that the Credential parameter is set instead of User/Password because of security reasons. If both Credential and this parameter is set, the Credential value is used.
Default Value
""
SCPFile Output Object (Send-SCP Cmdlet)
This object is created after a file has finished transferring.
Syntax
Object SCPFile {string Name;
int Time;
long Size;
int TransferRate;
}
Remarks
Once a file has finished being transferred, the SCPFile object is created with the Name of the file and the Time it took to transfer. TransferRate indicates the transfer rate in KBytes/s, this is calculated by dividing Size by the Time that it took.
Config Settings (Send-SCP Cmdlet)
The cmdlet accepts one or more of the following configuration settings. Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the cmdlet, access to these internal properties is provided through the Config method.SSHClient Config Settings
If MaxChannelDataLength > 0 and ChannelDataEOL is a non-empty string the cmdlet will internally buffer data waiting to fire SSHChannelData until either MaxChannelDataLength is reached or ChannelDataEOL is found, whichever comes first. Query ChannelDataEOLFound to know which condition was met. The buffer is reset any time SSHChannelData fires.
ChannelDataEOL and MaxChannelDataLength MUST be set together or unexpected behavior could occur.
This config is only valid when queried inside SSHChannelData, MaxChannelDataLength > 0, and ChannelDataEOL is non-empty.
Most SSH servers expect the SSH version string to have the expected format "SSH-protocol version-software version". See above for an example.
Value | Description |
0 (Disabled - default) | No communication with Pageant is attempted. |
1 (Enabled) | Pageant authentication is used if available. If Pageant is not running, or does not contain the expected key no error is thrown. |
2 (Required) | Only Pageant authentication is used. If Pageant is not running, or does not contain the expected key an error is thrown. |
Example enabling Pageant:
component.Config("EnablePageantAuth=1");
component.SSHUser = "sshuser";
component.SSHLogon("localhost", 22);
Note: This functionality is only available on Windows.
Example (for setting the threshold to 500 MB):
SSHComponent.Config("KeyRenegotiationThreshold=524288000")
0 (None) | No messages are logged. |
1 (Info - Default) | Informational events such as SSH handshake messages are logged. |
2 (Verbose) | Detailed data such as individual packet information is logged. |
3 (Debug) | Debug data including all relevant sent and received bytes are logged. |
If MaxChannelDataLength > 0 and ChannelDataEOL is a non-empty string the cmdlet will internally buffer data waiting to fire SSHChannelData until either MaxChannelDataLength is reached or ChannelDataEOL is found, whichever comes first. Query ChannelDataEOLFound to know which condition was met. The buffer is reset any time SSHChannelData fires.
ChannelDataEOL and MaxChannelDataLength MUST be set together or unexpected behavior could occur.
This provides an easy way to automatically reply to prompts with the password if one is presented by the server. The password will be auto-filled in the Response parameter of the SSHKeyboardInteractive event in the case of a match.
The following special characters are supported for pattern matching:
? | Any single character. |
* | Any characters or no characters (e.g., C*t matches Cat, Cot, Coast, Ct). |
[,-] | A range of characters (e.g., [a-z], [a], [0-9], [0-9,a-d,f,r-z]). |
\ | The slash is ignored and exact matching is performed on the next character. |
If these characters need to be used as a literal in a pattern, then they must be escaped by surrounding them with brackets []. Note: "]" and "-" do not need to be escaped. See below for the escape sequences:
Character | Escape Sequence |
? | [?] |
* | [*] |
[ | [[] |
\ | [\] |
For example, to match the value [Something].txt, specify the pattern [[]Something].txt.
The default value is 0, meaning this setting is not used.
component.Config("SignedSSHCert=ssh-rsa-cert-v01@openssh.com AAAAB3NzaC1yc2EAAAADAQABAAAB...");
The algorithm such as ssh-rsa-cert-v01@openssh.com in the above string is used as part of the authentication process. To use a different algorithm simply change this value. For instance all of the following are acceptable with the same signed public key:
- ssh-rsa-cert-v01@openssh.com AAAAB3NzaC1yc2EAAAADAQABAAAB...
- rsa-sha2-256-cert-v01@openssh.com AAAAB3NzaC1yc2EAAAADAQABAAAB...
- rsa-sha2-512-cert-v01@openssh.com AAAAB3NzaC1yc2EAAAADAQABAAAB...
component.Config("SSHAcceptServerCAKey=ssh-rsa AAAAB3NzaC1yc2EAAAADAQAB...");
SSHClient.Config("SSHAcceptServerHostKeyFingerprint=0a:1b:2c:3d");
If the server's fingerprint matches one of the values supplied, the cmdlet will accept the host key.
- MD5
- SHA1
- SHA256 (default)
The default value is 0 meaning no keep alives will be sent.
Note: The SSHREVERSETUNNEL cmdlet uses a default value of 30.
- curve25519-sha256
- curve25519-sha256@libssh.org
- diffie-hellman-group1-sha1
- diffie-hellman-group14-sha1
- diffie-hellman-group14-sha256
- diffie-hellman-group16-sha512
- diffie-hellman-group18-sha512
- diffie-hellman-group-exchange-sha256
- diffie-hellman-group-exchange-sha1
- ecdh-sha2-nistp256
- ecdh-sha2-nistp384
- ecdh-sha2-nistp521
- gss-group14-sha256-toWM5Slw5Ew8Mqkay+al2g==
- gss-group16-sha512-toWM5Slw5Ew8Mqkay+al2g==
- gss-nistp256-sha256-toWM5Slw5Ew8Mqkay+al2g==
- gss-curve25519-sha256-toWM5Slw5Ew8Mqkay+al2g==
- gss-group14-sha1-toWM5Slw5Ew8Mqkay+al2g==
- gss-gex-sha1-toWM5Slw5Ew8Mqkay+al2g==
Example:
SSHClient.Config("SSHKeyRenegotiate")
- hmac-sha1
- hmac-md5
- hmac-sha1-96
- hmac-md5-96
- hmac-sha2-256
- hmac-sha2-256-96
- hmac-sha2-512
- hmac-sha2-512-96
- hmac-ripemd160
- hmac-ripemd160-96
- hmac-sha2-256-etm@openssh.com
- hmac-sha2-512-etm@openssh.com
- umac-64@openssh.com
- umac-64-etm@openssh.com
- umac-128@openssh.com
- umac-128-etm@openssh.com
The setting should be a comma separated list of algorithms. At runtime the cmdlet will evaluate the specified algorithms and if the algorithm is applicable to the certificate specified in SSHCert it will be used. If the algorithm is not applicable the cmdlet will evaluate the next algorithm. Possible values are:
- ssh-rsa
- rsa-sha2-256
- rsa-sha2-512
- ssh-dss
- ecdsa-sha2-nistp256
- ecdsa-sha2-nistp384
- ecdsa-sha2-nistp521
- ssh-ed25519
- x509v3-sign-rsa
- x509v3-sign-dss
The default value in Windows is ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519.
rsa-sha2-256 and rsa-sha2-512 notes
The cmdlet will query the server for supported algorithms when connecting. If the server indicates support for rsa-sha2-256 or rsa-sha2-512 and the algorithm is present in the list defined by this setting (as in the default value), that algorithm will be used instead of ssh-rsa even when ssh-rsa appears first in the list.
For the rsa-sha2-256 and rsa-sha2-512 algorithms to be automatically preferred the server must support the ext-info-c mechanism. In practice, older servers do not support this and in that case ssh-rsa will be used since it appears first in the list. Newer servers do support this mechanism and in that case rsa-sha2-256 or rsa-sha2-512 will be used even though it appears after ssh-rsa.
This behavior has been carefully designed to provide maximum compatibility while automatically using more secure algorithms when connecting to servers which support them.
*SSH-1.99-*,*SSH-2.0-*,*SSH-2.99-*
Since both client and server must implement strict key exchange to effectively mitigate the Terrapin attack, the cmdlet provides options to further control the behavior in different scenarios. Possible values for this setting are:
0 | Disabled. Strict key exchange is not supported in the cmdlet. |
1 (default) | Enabled, but not enforced. This setting enables strict key exchange, but if the remote host does not support strict key exchange the connection is still allowed to continue. |
2 | Enabled, but reject affected algorithms if the remote host does not support strict key exchange. If the remote host supports strict key exchange all algorithms may be used. If the remote host does not support strict key exchange the connection will only continue if the selected encryption and MAC algorithms are not affected by the Terrapin attack. |
3 | Required. If the remote host does not support strict key exchange the connection will fail. |
When True (default) the cmdlet will wait for a response to the channel close message until the responses have been received, the server closes the connection, or Timeout seconds is reached.
When False the cmdlet will still send the channel close messages but will not wait for a response and will proceed to close the connection.
When set to True the cmdlet will initiate the disconnection sequence by sending SSH_MSG_DISCONNECT but will not close the connection, and instead will wait for the server to close the connection. Setting this to True may be beneficial in circumstances where many connections are being established, to avoid port exhaustion when sockets are in a TIME_WAIT state. Allowing the server to close the connection avoids the TIME_WAIT state of socket on the client machine.
When set to False (default) the client will close the connection. It is recommended to use this value unless there is a specific need to change it.
TCPClient Config Settings
If the FirewallHost setting is set to a Domain Name, a DNS request is initiated. Upon successful termination of the request, the FirewallHost setting is set to the corresponding address. If the search is not successful, an error is returned.
Note: This setting is provided for use by cmdlets that do not directly expose Firewall properties.
Note: This setting is provided for use by cmdlets that do not directly expose Firewall properties.
Note: This configuration setting is provided for use by cmdlets that do not directly expose Firewall properties.
0 | No firewall (default setting). |
1 | Connect through a tunneling proxy. FirewallPort is set to 80. |
2 | Connect through a SOCKS4 Proxy. FirewallPort is set to 1080. |
3 | Connect through a SOCKS5 Proxy. FirewallPort is set to 1080. |
10 | Connect through a SOCKS4A Proxy. FirewallPort is set to 1080. |
Note: This setting is provided for use by cmdlets that do not directly expose Firewall properties.
Note: This setting is provided for use by cmdlets that do not directly expose Firewall properties.
Note: This value is not applicable in macOS.
In the case that Linger is True (default), two scenarios determine how long the connection will linger. In the first, if LingerTime is 0 (default), the system will attempt to send pending data for a connection until the default IP timeout expires.
In the second scenario, if LingerTime is a positive value, the system will attempt to send pending data until the specified LingerTime is reached. If this attempt fails, then the system will reset the connection.
The default behavior (which is also the default mode for stream sockets) might result in a long delay in closing the connection. Although the cmdlet returns control immediately, the system could hold system resources until all pending data are sent (even after your application closes).
Setting this property to False forces an immediate disconnection. If you know that the other side has received all the data you sent (e.g., by a client acknowledgment), setting this property to False might be the appropriate course of action.
In multi-homed hosts (machines with more than one IP interface) setting LocalHost to the value of an interface will make the cmdlet initiate connections (or accept in the case of server cmdlets) only through that interface.
If the cmdlet is connected, the LocalHost setting shows the IP address of the interface through which the connection is made in internet dotted format (aaa.bbb.ccc.ddd). In most cases, this is the address of the local host, except for multi-homed hosts (machines with more than one IP interface).
Setting this to 0 (default) enables the system to choose a port at random. The chosen port will be shown by LocalPort after the connection is established.
LocalPort cannot be changed once a connection is made. Any attempt to set this when a connection is active will generate an error.
This; setting is useful when trying to connect to services that require a trusted port in the client side. An example is the remote shell (rsh) service in UNIX systems.
If an EOL string is found in the input stream before MaxLineLength bytes are received, the DataIn event is fired with the EOL parameter set to True, and the buffer is reset.
If no EOL is found, and MaxLineLength bytes are accumulated in the buffer, the DataIn event is fired with the EOL parameter set to False, and the buffer is reset.
The minimum value for MaxLineLength is 256 bytes. The default value is 2048 bytes.
www.google.com;www.nsoftware.com
Note: This value is not applicable in Java.
By default, this config is set to false.
0 | IPv4 Only |
1 | IPv6 Only |
2 | IPv6 with IPv4 fallback |
Socket Config Settings
Note: This option is not valid for UDP ports.
Some TCP/IP implementations do not support variable buffer sizes. If that is the case, when the cmdlet is activated the InBufferSize reverts to its defined size. The same happens if you attempt to make it too large or too small.
Some TCP/IP implementations do not support variable buffer sizes. If that is the case, when the cmdlet is activated the OutBufferSize reverts to its defined size. The same happens if you attempt to make it too large or too small.
Base Config Settings
The following is a list of valid code page identifiers:
Identifier | Name |
037 | IBM EBCDIC - U.S./Canada |
437 | OEM - United States |
500 | IBM EBCDIC - International |
708 | Arabic - ASMO 708 |
709 | Arabic - ASMO 449+, BCON V4 |
710 | Arabic - Transparent Arabic |
720 | Arabic - Transparent ASMO |
737 | OEM - Greek (formerly 437G) |
775 | OEM - Baltic |
850 | OEM - Multilingual Latin I |
852 | OEM - Latin II |
855 | OEM - Cyrillic (primarily Russian) |
857 | OEM - Turkish |
858 | OEM - Multilingual Latin I + Euro symbol |
860 | OEM - Portuguese |
861 | OEM - Icelandic |
862 | OEM - Hebrew |
863 | OEM - Canadian-French |
864 | OEM - Arabic |
865 | OEM - Nordic |
866 | OEM - Russian |
869 | OEM - Modern Greek |
870 | IBM EBCDIC - Multilingual/ROECE (Latin-2) |
874 | ANSI/OEM - Thai (same as 28605, ISO 8859-15) |
875 | IBM EBCDIC - Modern Greek |
932 | ANSI/OEM - Japanese, Shift-JIS |
936 | ANSI/OEM - Simplified Chinese (PRC, Singapore) |
949 | ANSI/OEM - Korean (Unified Hangul Code) |
950 | ANSI/OEM - Traditional Chinese (Taiwan; Hong Kong SAR, PRC) |
1026 | IBM EBCDIC - Turkish (Latin-5) |
1047 | IBM EBCDIC - Latin 1/Open System |
1140 | IBM EBCDIC - U.S./Canada (037 + Euro symbol) |
1141 | IBM EBCDIC - Germany (20273 + Euro symbol) |
1142 | IBM EBCDIC - Denmark/Norway (20277 + Euro symbol) |
1143 | IBM EBCDIC - Finland/Sweden (20278 + Euro symbol) |
1144 | IBM EBCDIC - Italy (20280 + Euro symbol) |
1145 | IBM EBCDIC - Latin America/Spain (20284 + Euro symbol) |
1146 | IBM EBCDIC - United Kingdom (20285 + Euro symbol) |
1147 | IBM EBCDIC - France (20297 + Euro symbol) |
1148 | IBM EBCDIC - International (500 + Euro symbol) |
1149 | IBM EBCDIC - Icelandic (20871 + Euro symbol) |
1200 | Unicode UCS-2 Little-Endian (BMP of ISO 10646) |
1201 | Unicode UCS-2 Big-Endian |
1250 | ANSI - Central European |
1251 | ANSI - Cyrillic |
1252 | ANSI - Latin I |
1253 | ANSI - Greek |
1254 | ANSI - Turkish |
1255 | ANSI - Hebrew |
1256 | ANSI - Arabic |
1257 | ANSI - Baltic |
1258 | ANSI/OEM - Vietnamese |
1361 | Korean (Johab) |
10000 | MAC - Roman |
10001 | MAC - Japanese |
10002 | MAC - Traditional Chinese (Big5) |
10003 | MAC - Korean |
10004 | MAC - Arabic |
10005 | MAC - Hebrew |
10006 | MAC - Greek I |
10007 | MAC - Cyrillic |
10008 | MAC - Simplified Chinese (GB 2312) |
10010 | MAC - Romania |
10017 | MAC - Ukraine |
10021 | MAC - Thai |
10029 | MAC - Latin II |
10079 | MAC - Icelandic |
10081 | MAC - Turkish |
10082 | MAC - Croatia |
12000 | Unicode UCS-4 Little-Endian |
12001 | Unicode UCS-4 Big-Endian |
20000 | CNS - Taiwan |
20001 | TCA - Taiwan |
20002 | Eten - Taiwan |
20003 | IBM5550 - Taiwan |
20004 | TeleText - Taiwan |
20005 | Wang - Taiwan |
20105 | IA5 IRV International Alphabet No. 5 (7-bit) |
20106 | IA5 German (7-bit) |
20107 | IA5 Swedish (7-bit) |
20108 | IA5 Norwegian (7-bit) |
20127 | US-ASCII (7-bit) |
20261 | T.61 |
20269 | ISO 6937 Non-Spacing Accent |
20273 | IBM EBCDIC - Germany |
20277 | IBM EBCDIC - Denmark/Norway |
20278 | IBM EBCDIC - Finland/Sweden |
20280 | IBM EBCDIC - Italy |
20284 | IBM EBCDIC - Latin America/Spain |
20285 | IBM EBCDIC - United Kingdom |
20290 | IBM EBCDIC - Japanese Katakana Extended |
20297 | IBM EBCDIC - France |
20420 | IBM EBCDIC - Arabic |
20423 | IBM EBCDIC - Greek |
20424 | IBM EBCDIC - Hebrew |
20833 | IBM EBCDIC - Korean Extended |
20838 | IBM EBCDIC - Thai |
20866 | Russian - KOI8-R |
20871 | IBM EBCDIC - Icelandic |
20880 | IBM EBCDIC - Cyrillic (Russian) |
20905 | IBM EBCDIC - Turkish |
20924 | IBM EBCDIC - Latin-1/Open System (1047 + Euro symbol) |
20932 | JIS X 0208-1990 & 0121-1990 |
20936 | Simplified Chinese (GB2312) |
21025 | IBM EBCDIC - Cyrillic (Serbian, Bulgarian) |
21027 | Extended Alpha Lowercase |
21866 | Ukrainian (KOI8-U) |
28591 | ISO 8859-1 Latin I |
28592 | ISO 8859-2 Central Europe |
28593 | ISO 8859-3 Latin 3 |
28594 | ISO 8859-4 Baltic |
28595 | ISO 8859-5 Cyrillic |
28596 | ISO 8859-6 Arabic |
28597 | ISO 8859-7 Greek |
28598 | ISO 8859-8 Hebrew |
28599 | ISO 8859-9 Latin 5 |
28605 | ISO 8859-15 Latin 9 |
29001 | Europa 3 |
38598 | ISO 8859-8 Hebrew |
50220 | ISO 2022 Japanese with no halfwidth Katakana |
50221 | ISO 2022 Japanese with halfwidth Katakana |
50222 | ISO 2022 Japanese JIS X 0201-1989 |
50225 | ISO 2022 Korean |
50227 | ISO 2022 Simplified Chinese |
50229 | ISO 2022 Traditional Chinese |
50930 | Japanese (Katakana) Extended |
50931 | US/Canada and Japanese |
50933 | Korean Extended and Korean |
50935 | Simplified Chinese Extended and Simplified Chinese |
50936 | Simplified Chinese |
50937 | US/Canada and Traditional Chinese |
50939 | Japanese (Latin) Extended and Japanese |
51932 | EUC - Japanese |
51936 | EUC - Simplified Chinese |
51949 | EUC - Korean |
51950 | EUC - Traditional Chinese |
52936 | HZ-GB2312 Simplified Chinese |
54936 | Windows XP: GB18030 Simplified Chinese (4 Byte) |
57002 | ISCII Devanagari |
57003 | ISCII Bengali |
57004 | ISCII Tamil |
57005 | ISCII Telugu |
57006 | ISCII Assamese |
57007 | ISCII Oriya |
57008 | ISCII Kannada |
57009 | ISCII Malayalam |
57010 | ISCII Gujarati |
57011 | ISCII Punjabi |
65000 | Unicode UTF-7 |
65001 | Unicode UTF-8 |
Identifier | Name |
1 | ASCII |
2 | NEXTSTEP |
3 | JapaneseEUC |
4 | UTF8 |
5 | ISOLatin1 |
6 | Symbol |
7 | NonLossyASCII |
8 | ShiftJIS |
9 | ISOLatin2 |
10 | Unicode |
11 | WindowsCP1251 |
12 | WindowsCP1252 |
13 | WindowsCP1253 |
14 | WindowsCP1254 |
15 | WindowsCP1250 |
21 | ISO2022JP |
30 | MacOSRoman |
10 | UTF16String |
0x90000100 | UTF16BigEndian |
0x94000100 | UTF16LittleEndian |
0x8c000100 | UTF32String |
0x98000100 | UTF32BigEndian |
0x9c000100 | UTF32LittleEndian |
65536 | Proprietary |
- Product: The product the license is for.
- Product Key: The key the license was generated from.
- License Source: Where the license was found (e.g., RuntimeLicense, License File).
- License Type: The type of license installed (e.g., Royalty Free, Single Server).
- Last Valid Build: The last valid build number for which the license will work.
This setting only works on these cmdlets: AS3Receiver, AS3Sender, Atom, Client(3DS), FTP, FTPServer, IMAP, OFTPClient, SSHClient, SCP, Server(3DS), Sexec, SFTP, SFTPServer, SSHServer, TCPClient, TCPServer.
Setting this configuration setting to true tells the cmdlet to use the internal implementation instead of using the system security libraries.
On Windows, this setting is set to false by default. On Linux/macOS, this setting is set to true by default.
If using the .NET Standard Library, this setting will be true on all platforms. The .NET Standard library does not support using the system security libraries.
Note: This setting is static. The value set is applicable to all cmdlets used in the application.
When this value is set, the product's system dynamic link library (DLL) is no longer required as a reference, as all unmanaged code is stored in that file.