Veja a lista de problemas conhecidos do powershell para macOS: link
Client-side remoting from Linux/macOS is not supported with the initial package. The work is being done in the psl-omi-provider repo.
Estou tentando me conectar a um Servidor Nano do Windows AWS EC2 recém-girado da minha máquina OS X.
Estou executando o powershell do OSX e estou seguindo estas instruções
PS /Users/alex/Projects> $ip = "ec2-x-x-x-x.eu-west-1.compute.amazonaws.com"
PS /Users/alex/Projects> Set-Item WSMan:\localhost\Client\TrustedHosts $ip
Set-Item : Cannot find drive. A drive with the name 'WSMan' does not exist.
At line:1 char:1
+ Set-Item WSMan:\localhost\Client\TrustedHosts $ip
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (WSMan:String) [Set-Item], DriveNotFoundException
+ FullyQualifiedErrorId : DriveNotFound,Microsoft.PowerShell.Commands.SetItemCommand
Eu tentei ignorar isso e passar para as duas etapas restantes:
PS /Users/alex/Projects> $user = "$ip\Administrator"
PS /Users/alex/Projects> Enter-PSSession -ComputerName $ip -Credential $user
Windows PowerShell credential request
Enter your credentials.
Password for user ec2-x-x-x-x.eu-west-1.compute.amazonaws.com\Administrator: ********************************
Enter-PSSession : MI_RESULT_ACCESS_DENIED
At line:1 char:1
+ Enter-PSSession -ComputerName $ip -Credential $user
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (ec2-x-x-x-x...e.amazonaws.com:String) [Enter-PSSession], PSInvalidOperationException
+ FullyQualifiedErrorId : CreateRemoteRunspaceFailed
Veja a lista de problemas conhecidos do powershell para macOS: link
Client-side remoting from Linux/macOS is not supported with the initial package. The work is being done in the psl-omi-provider repo.
Você está querendo um login de shell interativo? Se sim, porque não o ssh a partir de um terminal Mac OS X? O comando seria algo como:
ssh -i ~ / .ssh / nome_do_arquivo.pem ec2-usuá[email protected]
onde o arquivo pem pode ser criado seguindo estas instruções: