- Home /
Use SSH.NET in Unity
Im trying to import that library: https://github.com/sshnet/SSH.NET but I can't make it run on Unity. I'm using Unity 5.5.0b7 (64-bit).
@Pr03$$anonymous$$Vi
Did you get it to work?
EDIT: You can get a compiled .dll here: http://j.mp/sshNet
Answer by Shovelcat · Dec 24, 2016 at 07:52 AM
You have to use the .net 3.5 instead of 4.0.
Hi
@Shovelcat, can you elaborate on your answer?
Unfortunately I can't even get the project built and there is no explanation on github :(
When opening the project there is a "build.cmd" but when clicking it VS replies with "document cannot be opened. It was renamed, deleted or moved".
I did neither. $$anonymous$$an this is frustratring.
Thanks a lot!
EDIT:
Wow, it is so easy: Simply load the project and then right-click on either the Renci.SshNet or the Renci.SshNet.NET35 entry to the right. Choose "Create" (might be called "Compile" in English, my VS2015 version is not in English so I am not 100% certain on that) and it should be done in a few seconds. You can find the .dll in the folder SSH.NET-master\SSH.NET-master\src\Renci.SshNet.NET35\bin\Debug\Renci.SshNet.dll
EDIT2: Oh yeah one more thing: As documentation is still missing on github, one can access it on http://sshnet.codeplex.com/documentation
EDIT3: You can get a compiled .dll here: http://j.mp/sshNet
@$$anonymous$$r_Orange can you re-upload your .dll ? The dropbox link doesn't work anymore. thank you!
Answer by sgrein · Oct 22, 2018 at 07:34 PM
Hello,
I tested this on my (latest) Unity version (Unity 2018.2.12f1 (64-bit)) on Windows 10 64-bit with Visual Studio 2017.
My Unity project settings are: Scripting Runtime Environment 3.5 (API compatibility level 2.0) with Scripting Backend Mono.
I had to import the SSH.NET DLL (Net3.5 can be found on Github under the Releases section) to the Assets folder. Besides this I did not import the DLL with Visual Studio. It seemed enough to put it in the Assets folder.
Hope this helps somebody, best, SG
I am having a very hard time implementing this into Unity. Would you please advise or share your full?
Running Unity 2018.3.14 OS: windows 10 Software: Visual studio acids (my 2017 community edition expired)
Hello, what problem are you facing? You will have to change .NET version to 3.5 not 4. Then the SSH.NET DLL files will wok if you put it in the Assets folder.
Good $$anonymous$$orning and thank you for your prompt reply! Correct! I was have it set to 3.5 with the correct API at 2.0. I followed your instructions for the location of the dll. It only shows up when I search for it by name but not in the file explorer by directory location. I did get it to take “using Renci.Ssh” I was able to get it to take it when I dragged the entire folder “../arc/Rencissh.NET35” but the script I was using had more Rencissh using statements like Sftp that were not being accepted. Even if you have a script to share may be helpful. I’m trying to do Create ssh/telnet session to my nodes. Borderline buying the $20 SSH package on the asset store just because this has been a hassle. Just not confident it will meet my needs.
I hope you may be able to advise, this is the closet I’ve gotten but still need a valid script. Currently my project just has the dll in the asset folder and a soon to be telnet script with no additional code blocks.
This mornings Update———- Turns out the DLL I had was “targeting 4.0” so it had to disable the editor to clear that message. After a nights rest I hunted another dll and found a 2016 package with a “3.5 targeted” dll to import. NOW I can use the using stament Renci.ssh;
I’ll try and put together my script now without using the ones I’ve found online. Any attional guidance you may have would be greatly appreciated.
Best,
Your answer
Follow this Question
Related Questions
Unity with SignalR 1 Answer
uNet Connection to IPv6 [Networking] 0 Answers
[Edited]How To establish a mmo game By using Bluetooth 1 Answer
LLAPI, multiple connections 0 Answers
Why I cant use 2 NetworkManagers in the same time? 0 Answers