SSH from powershell using SSH.Net

Hey guys,

I just started using the SSH module within powershell to ssh into a linux server. I am able to ssh and view my home directory but can’t go any further. Meaning, the cd command does not produce any result. It just runs and gives me an empty result.

Any help is appreciated.


That’s something in how the Linux server, or its SSH server, is configured. Not PowerShell. Also, you don’t mention what SSH module you’re using. There isn’t a native one for PowerShell… but, if it’s connecting, then the module is also doing its job. Your problem is on the server - likely, whatever account you’re using doesn’t have permissions, or the SSH daemon is configured to lock you into your home directory.

It is an SSH module that’s derived from the SSH.Net library, I imported the files which I found on this website:

I don’t think there is a issue with the linux server as I can interact with it when ssh’ing from Putty. It could be the way I am using the associated cmdlets for this module. Not entirely sure though.

I don’t have enough familiarity with the module to tell you one way or the other. It’d be a good idea to contact its authors, if you can. Sorry.

Not a problem. Thanks anyway!

By default the “cd” command in Linux does not produce any output if it’s successful. It can sometimes change your prompt if your shell is configured for that.

However when you look at the screenshots from where you got the module, they also perform a CD command and it never changes the prompt. So it appears that the “prompt” given by this module does not change based on your current location.

Try “pwd” to check your location after changing directory.