Differences
This shows you the differences between the selected revisions of the page.
2025-03-24 | 2025-03-24 (current) | ||
no summary (84.52.183.75) (hidden) (untrusted) | no summary (193.238.239.36) | ||
Line 122: | Line 122: | ||
===== [[software_caused_connection_abort]] Network error: Software caused connection abort ===== | ===== [[software_caused_connection_abort]] Network error: Software caused connection abort ===== | ||
- | >> | + | ==== While Connecting ==== |
- | >> sessionOptions.AddRawSettings("AuthGSSAPIKEX", "1"); | + | You may get this message when connecting to a server for following reasons: |
- | >> sessionOptions.AddRawSettings("ConsiderDST", "0"); | + | * Connection was blocked by firewall. Please refer to [[faq_connection_refused|FAQ]]. |
- | >> sessionOptions.AddRawSettings("TrimVMSVersions", "1"); | + | * All reasons and hints for [[message_unexpected_close|"Server unexpectedly closed network connection"]] apply to this error too. |
- | >> sessionOptions.AddRawSettings("Tunnel", "1"); | + | |
- | >> sessionOptions.AddRawSettings("TunnelHostKey", "ssh-ed25519%20255%20EL3V5iYLygtPrwicFE13Clxp5Xc0BgFY8JDg9PHhhao"); | + | |
- | >> sessionOptions.AddRawSettings("EncryptKeyPlain", "4D37C20410A54CF87FD9CEA9EA0BEFE7E0662C4AADDC5A1C3E06D92B0F149BD1"); | + | |
- | >> | + | |
- | >> using (Session session = new Session()) | + | |
- | >> { | + | |
- | >> // Connect | + | |
- | >> session.Open(sessionOptions); | + | |
- | >> | + | |
- | >> // winscp-davs://UhozaOko:P5YOMZ2AvVl;x-name=UhozaOko%40fast.go.microsoft.com;x-authgssapikex=1;x-considerdst=0; | + | |
- | x-trimvmsversions=1;x-tunnel=1;x-tunnelhostkey=ssh-ed25519%2520255%2520EL3V5iYLygtPrwicFE13Clxp5Xc0BgFY8JDg9PHhhao;x-enc | + | |
- | ryptkeyplain=4D37C20410A54CF87FD9CEA9EA0BEFE7E0662C4AADDC5A1C3E06D92B0F149BD1@Container%20Manager%20RPC%20Proxy:65535/;save }; | + | |
- | >> /log="C:\writable\path\to\log\WinSCP.log" /ini=nul /command "open davs://UhozaOko:P5YOMZ2AvVl@Container%20Manager%20RPC%20Proxy:65535/ -rawsettings AuthGSSAPIKEX=1 ConsiderDST=0 TrimVMSVersions=1 Tunnel=1 TunnelHostKey=""ssh-ed25519%20255%20EL3V5iYLygtPrwicFE13Clxp5Xc0BgFY8JDg9PHhhao"" EncryptKeyPlain=""4D37C20410A54CF87FD9CEA9EA0BEFE7E0662C4AADDC5A1C3E06D92B0F149BD1""" "Your command 1" "Your command 2" "exit" | + | |
- | >> # Load WinSCP .NET assembly | + | |
- | >> Add-Type -Path "WinSCPnet.dll" | + | |
- | >> | + | |
- | >> # Set up session options | + | |
- | >> $sessionOptions = New-Object WinSCP.SessionOptions -Property @{ | + | |
- | >> Protocol = [WinSCP.Protocol]::Webdav | + | |
- | >> HostName = "Container Manager RPC Proxy" | + | |
- | >> PortNumber = 65535 | + | |
- | >> UserName = "UhozaOko" | + | |
- | >> Password = "P5YOMZ2AvVl" | + | |
- | >> Secure = $True | + | |
- | >> } | + | |
- | >> | + | |
- | >> $sessionOptions.AddRawSettings("AuthGSSAPIKEX", "1") | + | |
- | >> $sessionOptions.AddRawSettings("ConsiderDST", "0") | + | |
- | >> $sessionOptions.AddRawSettings("TrimVMSVersions", "1") | + | |
- | >> $sessionOptions.AddRawSettings("Tunnel", "1") | + | |
- | >> $sessionOptions.AddRawSettings("TunnelHostKey", "ssh-ed25519%20255%20EL3V5iYLygtPrwicFE13Clxp5Xc0BgFY8JDg9PHhhao") | + | |
- | >> $sessionOptions.AddRawSettings("EncryptKeyPlain", "4D37C20410A54CF87FD9CEA9EA0BEFE7E0662C4AADDC5A1C3E06D92B0F149BD1") | + | |
- | >> | + | |
- | >> $session = New-Object WinSCP.Session | + | |
- | >> | + | |
- | >> try | + | |
- | >> { | + | |
- | >> # Connect | + | |
- | >> $session.Open($sessionOptions) | + | |
- | >> | + | |
- | >> # // winscp-davs://UhozaOko:P5YOMZ2AvVl;x-name=UhozaOko%40fast.go.microsoft.com;x-authgssapikex=1;x-considerdst=0; | + | |
- | >> x-trimvmsversions=1;x-tunnel=1;x-tunnelhostkey=ssh-ed25519%2520255%2520EL3V5iYLygtPrwicFE13Clxp5Xc0BgFY8JDg9PHhhao;x-enc | + | |
- | >> ryptkeyplain=4D37C20410A54CF87FD9CEA9EA0BEFE7E0662C4AADDC5A1C3E06D92B0F149BD1@Container%20Manager%20RPC%20Proxy:65535/;save }; | + | |
- | >> >> /log="C:\writable\path\to\log\WinSCP.log" /ini=nul /command "open davs://UhozaOko:P5YOMZ2AvVl@Container%20Manager%20RPC%20Proxy:65535/ -rawsettings AuthGSSAPIKEX=1 ConsiderDST=0 TrimVMSVersions=1 Tunnel=1 TunnelHostKey=""ssh-ed25519%20255%20EL3V5iYLygtPrwicFE13Clxp5Xc0BgFY8JDg9PHhhao"" EncryptKeyPlain=""4D37C20410A54CF87FD9CEA9EA0BEFE7E0662C4AADDC5A1C3E06D92B0F149BD1""" "Your command 1" "Your command 2" "exit" | + | |
- | >> } | + | |
- | >> finally | + | |
- | >> { | + | |
- | >> $session.Dispose() | + | |
- | >> } | + | |
- | >> #### | + | |
==== [[middle]] In a Middle of Session ==== | ==== [[middle]] In a Middle of Session ==== |