Невозможно подключиться по SSH к моей виртуальной машине через Windows Power Shell ISE

1019
Sri Harsha Kappala

На моем хосте vmWare работает гостевая виртуальная машина Linux, к которой я хочу получить доступ с помощью Windows PowerShell ISE. Я обычно могу SSH к моей виртуальной машине, но я не могу с Windows PowerShell ISE.

Когда я пытаюсь выполнить SSH для моей виртуальной машины, операция SSH застревает и не отображает дальнейшую консоль или сообщение. Я использую SSH-клиент, который поставляется с GIT, Windows 8.1 и vmWare Workstation 10.

PS C:\> ssh esis@192.168.255.142 ssh : Warning: Permanently added '192.168.255.142' (RSA) to the list of known hosts. At line:1 char:1 + ssh esis@192.168.255.142 + ~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (Warning: Perman...of known hosts.:String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError 
1
@SgtOJ Ваше изменение изменило весь контекст моего вопроса. В Windows есть вещь под названием ** PowerShell ISE **. Я могу SSH из PowerShell, но не из ** PowerShell ISE ** Sri Harsha Kappala 10 лет назад 0
Кажется, это работает нормально для меня, используя Windows 8.1 и SSH-клиент, который поставляется с git. Вы пытались подключиться к другому хосту? Znuff 10 лет назад 0
Вы проверили этот [пост] (https://answers.atlassian.com/questions/136939/warning-permanently-added-the-rsa-host-key-for-ip-address-207-223-240-182 -в-в-лист-из-известных-хостов)? SgtOJ 10 лет назад 0

1 ответ на вопрос

1
BartekB

It's limitation of PowerShell ISE. Any application that will try to control the console pane will fail and/or get stuck.

Some of those commands are already "blacklisted", you can see those in $psUnsupportedConsoleApplications.

Error you see is probably not relevant at all: ssh writes information to stderr, and PowerShell generates error on top of this message.

But it's the fact that ssh needs full control over console you are running it in (e.g. to enable you to run things like vim) that's "freezes" ISE. To see the same issue with built in applications you can try the same with netsh:

$psUnsupportedConsoleApplications.Remove('netsh') netsh 

This should lock ISE as well, for the same reasons ssh is locking it.

BTW: if you want just run a few commands, plink.exe can be better tool than "normal" ssh. It works just fine in ISE, because it's not trying to take over console.

Похожие вопросы