Skip to content

Conversation

@cgroschupp
Copy link

No description provided.

@cgroschupp cgroschupp force-pushed the feat/ssh-check-static branch from e02a168 to d2455f8 Compare July 27, 2020 07:09
@cgroschupp
Copy link
Author

ready to review.

@KarstenSiemer
Copy link

KarstenSiemer commented Aug 12, 2020

+1 for this change
what do you think @res0nance @fcojfernandez ?

String instanceCapStr, String iamInstanceProfile, boolean deleteRootOnTermination,
boolean useEphemeralDevices, boolean useDedicatedTenancy, String launchTimeoutStr, boolean associatePublicIp,
String customDeviceMapping, boolean connectBySSHProcess, boolean monitoring,
boolean t2Unlimited, ConnectionStrategy connectionStrategy, int maxTotalUses, List<? extends NodeProperty<?>> nodeProperties, String staticHostKeys) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't modify existing constructors

@fcojfernandez
Copy link
Member

I don't have bandwith these days. @MRamonLeon could you please have a look at this PR? Because you worked on the host-key verification, your review might be actual valuable.

@KarstenSiemer
Copy link

Any progress on this?

while (scanner.hasNextLine()) {
String hostKeyString = scanner.nextLine();
String[] hostKeyParts = hostKeyString.split(" ");
if (hostKeyParts.length < 2 || hostKeyParts.length > 3) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (hostKeyParts.length < 2 || hostKeyParts.length > 3) {
if (hostKeyParts.length != 2) {

String hostKeyString = scanner.nextLine();
String[] hostKeyParts = hostKeyString.split(" ");
if (hostKeyParts.length < 2 || hostKeyParts.length > 3) {
EC2Cloud.log(LOGGER, Level.WARNING, computer.getListener(), "The provided static SSH key is invalid");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you add the reason it would be appreciated, like:

the format is algorithm base64-public-key, example: ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHm0sVqkjSuaPg8e7zfaKXt3b1hE1tBwFsB18NOWv5ow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants