/docs/ftps) and [ WebDAVS ](/eng/docs/webdav) protocols only.  
` -passphrase=<phrase> ` |  Passphrase for encrypted private keys and client certificates.   
SFTP  ,  SCP  ,  FTPS  and WebDAVS protocols only.  
The passphrase  can be read from a file  .  
` -passive=on|off ` |  Selects [ passive ](/eng/docs/ui_login_connection#connection) ( ` on ` ) or active ( ` off ` ) transfer mode ( [ FTP ](/eng/docs/ftp) protocol only).   
` -implicit ` |  Implicit  TLS  /  SSL  ( [ FTPS protocol ](/eng/docs/ftps) only).   
` -explicit ` |  Explicit TLS/SSL ( [ FTPS protocol ](/eng/docs/ftps) only).   
` -timeout=<sec> ` |  Server response timeout.   
` -username=<user> ` |  An alternative way to provide a username. The username is normally part of the [ session URL ](/eng/docs/session_url) . Using this switch has the advantage of not needing to [ URL-encode special characters ](/eng/docs/session_url#special) .   
` -password=<pass> ` |  An alternative way to provide a password. The password is normally part of the session URL. Using this switch has the advantage of not needing to URL-encode special characters.   
The password  can be read from a file  .  
` -passwordsfromfiles ` |  Interpret values of  ` -password ` ,  ` -passphrase ` and in general all passwords from all sources as paths to files, where the actual passwords are read from. The files must use  UTF-8  or  UTF-16  encoding.  1   
` -rawsettings  setting1=value1  setting2=value2  …  ` |  Allows configuring any site settings using [ raw format ](/eng/docs/rawsettings) as in an INI file (with optional use of [ keywords ](/eng/docs/rawsettings#keywords) ). E.g. to enable SSH compression and agent forwarding use ` -rawsettings  Compression=on  AgentFwd=on  ` . The switch must come after session URL.   
` -filezilla ` |  Load ` site ` from FileZilla site manager.  2    
Additionally it prints a full syntax to use to open an identical session
without relying on an external FileZilla configuration.  
  
_Advertisement_

XML  log element: ` [ session ](/eng/docs/logging_xml) `

##  Examples

    
    
    [open](https://winscp.net/eng/docs/scriptcommand_open) sftp://martin:mypassword@example.com/ -hostkey="ssh-rsa 2048 xxxxxxxxxxx..."
    
    
    [open](https://winscp.net/eng/docs/scriptcommand_open) scp://test@example.com:2222/ -privatekey=mykey.ppk
    
    
    [open](https://winscp.net/eng/docs/scriptcommand_open) ftps://martin:mypassword@example.com/ -implicit -certificate="xx:xx:xx:xx:xx:xx:xx:xx..."
    
    
    [open](https://winscp.net/eng/docs/scriptcommand_open) sftp://martin:mypassword@example.com/ -rawsettings ProxyMethod=3 ProxyHost=proxy
    
    
    [open](https://winscp.net/eng/docs/scriptcommand_open) sftp://martin@example.com/
    
    
    [open](https://winscp.net/eng/docs/scriptcommand_open) sftp://example.com/
    
    
    [open](https://winscp.net/eng/docs/scriptcommand_open) ftp://martin:mypassword@example.com/

##  Converting to .NET Assembly

When [ converting script to .NET Assembly ](/eng/docs/library_from_script) ,
map ` open ` command to ` [ Session.Open ](/eng/docs/library_session_open) `
method. The ` Session.Open ` accepts instance of ` [ SessionOptions
](/eng/docs/library_sessionoptions) ` class, which needs to be populated
according to parameters and switches of ` open ` command.

Parameters mapping: [ Session URL ](/eng/docs/session_url) in command
parameter ` session_url ` needs to be separated to its components, which are
to be stored into ` [ SessionOptions.HostName
](/eng/docs/library_sessionoptions#hostname) ` ( ` host ` component), ` [
SessionOptions.UserName ](/eng/docs/library_sessionoptions#username) ` ( `
username ` ), ` [ SessionOptions.Password
](/eng/docs/library_sessionoptions#password) ` ( ` password ` ), ` [
SessionOptions.PortNumber ](/eng/docs/library_sessionoptions#portnumber) ` ( `
port ` ) and ` [ SessionOptions.Protocol
](/eng/docs/library_sessionoptions#protocol) ` ( `
sftp|ftp|ftps|ftpes|http|https|s3|scp:// ` ).  3