• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 303
  • Last Modified:

PowerShell 5.1 SSH out - looking for key exchange

I got the SSH installed

When i try to ssh out:

ssh servername
ssh username@servername

i get this:  
Unable to negotiate with no matching key exchange method found. Their offer: diffie-hellman-group1-sha1

We are not using SSH keys to authenticate into devices,

Any way to bypass or ignore the key and just ask for username and password or just password if we specify username in the string?

  • 2
  • 2
1 Solution
Adam BrownSr Solutions ArchitectCommented:
http://www.openssh.com/legacy.html explains the issue. Given that you're using a Windows port, the fix is probably different, if it's available at all. You can probably try the command line strings they show there, but I can't say if it will work.

What software do you have for SSH running on the servers? If it's also OpenSSH, you might want to bring that issue up on GitHUB's comments for it.
itmtiAuthor Commented:
Just trying to use PowerShell to SSH to networking devices like switches, firewalls, routers etc.,   not necessarily linux servers.

Been using Putty as my client works fine, thought to have it all in one from single CLI (powershell and ssh client)

Installed linux bash that works well too.

Microsoft claimed to have the ssh support on coming releases of PowerShell, guess will have to wait more.

Thanks for suggestions!
Adam BrownSr Solutions ArchitectCommented:
There is a module for powershell that enables SSH in all versions (I think): http://www.thomasmaurer.ch/2016/04/using-ssh-with-powershell/ has info.
itmtiAuthor Commented:
Yep tried that as well, was hopping for more simple way:
typing just: ssh host
instead of:        New-SSHSession -ComputerName servername

Running bash now on Windows answers pretty much all of my concerns, I really like that.   All keyboard shortcuts work, etc.,

Not there is something wrong with Putty,  i just seem to control everything faster and easier with less mouse clicking.  

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now