darkoperator / darkoperator/Posh-SSH
New-SFTPSession fails on macOS with Windows Registry error
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 1.1k
- Forks
- 222
- PR merge metrics
- No merged PRs in 30d
Description
Platform is macOS 10.13.4 with PowerShell 6 and .NET Core 2.1
When trying to create an SFTP session:
New-SFTPSession -ComputerName $server -Credential $creds -AcceptKey -Verbose
An exception is thrown seeming to indicate this isn't compatible with macOS, as it's referencing the Windows Registry:
New-SFTPSession : The type initializer for 'Microsoft.Win32.Registry' threw an exception.
At line:1 char:2
+ New-SFTPSession -ComputerName redacted -Credenti ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [New-SFTPSession], TypeInitializationException
+ FullyQualifiedErrorId : System.TypeInitializationException,SSH.NewSftpSession
$PSVersionTable
Name Value
---- -----
PSVersion 6.0.2
PSEdition Core
GitCommitId v6.0.2
OS Darwin 17.5.0 Darwin Kernel Version 17.5.0: Mon Mar 5 22:24:32 PST 2018; root:xnu...
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the New-SFTPSession command on macOS with the reported PowerShell and .NET Core versions, then trace the session creation path that triggers the Microsoft.Win32.Registry exception. Done means the same SFTP session can be created on macOS without the Windows Registry error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100