I have the same problem as @donepudi369 and @bsubbaraman. I tried to figured it out and I discovered that it is hanging when creating the SMBClient.
I added some logs to the code:
log.log(Level.FINE, "Inside WinConnection constructor");
this.host = host;
this.username = username;
this.password = password;
log.log(Level.FINE, "Creating SMBClient");
this.smbclient = new SMBClient();
log.log(Level.FINE, "SMBClient created");
I can see the
Inside WinConnection constructor and
Creating SMBClient but it seems like SMBClient() never returns. The "SMBClient created" is never logged.
Hi, i was tasked to get ec2 in windows working. After spending some hours trying winRM, switched to the openssh was. (i havent read this chat until now, btw on recent enough windows (win10 or win serv 2019) the SSH can be installed with more easily than said above)
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
Set-Service -Name sshd -StartupType 'Automatic'
New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -PropertyType String -Force
It hasn't appeared in my mind to run the plugin in linux mode so i just started a java IDE, and rework the EC2WindowsLauncher.java to use SSH (copypasta driven development from Ec2UnixLauncher.java)
It is on https://github.com/ultinous-dancsa/ec2-plugin/tree/windows-over-ssh-poc
(its code quality is somewhere between the spagetti and "i just want a working PoC within 3 hours with no prior knowledge")
It works with password auth, the ami only had the ssh, and java install and a user creation
Do you plan to implement something like this in the plugin, or i've just read above the unix setting works for windows too if ssh is installed?
The instance EC2 Amazon-Linux 2 (i-xxxxxxxxxxxxx) has a blank console. Maybe the console is yet not available. If enough time has passed, consider changing the key verification strategy or the AMI used by one printing out the host key in the instance console ... INFO: The instance console is blank. Cannot check the key. The connection to EC2 Amazon-Linux 2 (i-xxxxxxxxxxxxx) is not allowed ... HTTP ERROR 404 Not Found
Windows EC2 seems super broke. Just updated the plugin, set host key verify to 'Off'
I verified the ports 5985 and 445 are both listening, and I can telnet in without issue. This worked without issue before I upgraded the plugin.
EC2 (MY-JENKINS) - win-on-demand (i-111111111111111) booted at 1595469330000
Connecting to (10.11.xxx.xxx) with WinRM as administrator
I managed to get WinRM back up and running manually updating to this PR build: https://ci.jenkins.io/job/Plugins/job/ec2-plugin/job/PR-481/2/artifact/org/jenkins-ci/plugins/ec2/1.51-rc1179.7d1283eb45d5/ec2-1.51-rc1179.7d1283eb45d5.hpi
From this PR: jenkinsci/ec2-plugin#481
What I'm finding is that SMB is able to finally connect. WinRM is still opening a ton of connections that linger on the Windows client side, so I don't think it's 100%. Seems to take a long time to spin up also.