System.Net.DNSPermission error

Oct 11, 2012 at 8:44 PM
Edited Oct 11, 2012 at 8:45 PM

Hi,

  I am trying to use this library and I get an error of sorts when I attempt to connect. BTW I used this site to set it up:

http://www.powershelladmin.com/wiki/SSH_from_PowerShell_using_the_SSH.NET_library

I type the import and it appears to work, I type:

 New-SshSession -ComputerName xx.xx.xx.xx -UserName account [ENTER]

It prompts for the password I type it and his enter and I get:

Unable to connect to xx.xx.xx.xx: Exception calling "Connect" with "0"
argument(s): "Request for the permission of type 'System.Net.DnsPermission,
System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
failed."

The SSH server works and I am using FreeSSHD.

Any help with this would be great! Thanks!

-D

Oct 12, 2012 at 4:21 PM
Edited Oct 12, 2012 at 4:55 PM

Appears my home folder is on a network drive and that was causing the problem. I moved the module to the Windows Powershell modules folder rather than my documents powershell folder and it appears to be working now.

It connects to the SSH server however when I do an Enter-SshSession I get a (pwd failed)