Force parameter not working in 3.0 alpha
Running the 3.0 alpha on Powershell 7.1.1 on Ubuntu 20.
When using the -Force parameter as such:
New-SSHSession -ComputerName "10.1.2.28" -Credential $cred -Force
I get an error message:
New-SSHSession: Object reference not set to an instance of an object.
Removing the -Force parameter fixes the issue.
Thanks will take a look.
Sent from my iPhone
On Feb 4, 2021, at 5:56 AM, tbhel [email protected] wrote:
Running the 3.0 alpha on Powershell 7.1.1 on Ubuntu 20. When using the -Force parameter as such: New-SSHSession -ComputerName "10.1.2.28" -Credential $cred -Force I get an error message: New-SSHSession: Object reference not set to an instance of an object.
Removing the -Force parameter fixes the issue.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
thanks, just pushed a fix to the source code b8e5d39d4d28e09afab5431173d8ade1452a54d6 it will be included in the next beta for the module
@darkoperator, It should be fixed without code move just add ? symbol
var savedHostKey = Store?.GetKey(computer);
because result of foreach cycle used for filtering connectInfo.HostKeyAlgorithms before creating client. I cannot guarantee that this change have effect after client creation, just does not tested it
Update: I look into Renci code, It can be solved with move, but i like the "?" :)
Yep already fixed :)
Sent from my iPhone
On Feb 4, 2021, at 11:51 AM, Max Kozlov [email protected] wrote:
@darkoperator, It should be fixed without code move just add ? symbol
var savedHostKey = Store?.GetKey(computer); because result of foreach cycle used for filtering connectInfo.HostKeyAlgorithms before creating client. I cannot guarantee that this change have effect after client creation, just does not tested it
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.