summaryrefslogtreecommitdiff
path: root/doc/forum/Could_not_load_host_key:___47__etc__47__ssh__47__ssh__95__host__95__ed25519__95__key
diff options
context:
space:
mode:
Diffstat (limited to 'doc/forum/Could_not_load_host_key:___47__etc__47__ssh__47__ssh__95__host__95__ed25519__95__key')
-rw-r--r--doc/forum/Could_not_load_host_key:___47__etc__47__ssh__47__ssh__95__host__95__ed25519__95__key/comment_1_a5fdd6df5bcfab832aa1721cad139de8._comment7
-rw-r--r--doc/forum/Could_not_load_host_key:___47__etc__47__ssh__47__ssh__95__host__95__ed25519__95__key/comment_2_0197951e17a4a47cce74ce6cc4108d50._comment20
-rw-r--r--doc/forum/Could_not_load_host_key:___47__etc__47__ssh__47__ssh__95__host__95__ed25519__95__key/comment_3_1f6fdf9c03705665b3d7d1a562dfc2e2._comment9
-rw-r--r--doc/forum/Could_not_load_host_key:___47__etc__47__ssh__47__ssh__95__host__95__ed25519__95__key/comment_4_38e533c398521a2f1e02fde939f753e1._comment35
4 files changed, 71 insertions, 0 deletions
diff --git a/doc/forum/Could_not_load_host_key:___47__etc__47__ssh__47__ssh__95__host__95__ed25519__95__key/comment_1_a5fdd6df5bcfab832aa1721cad139de8._comment b/doc/forum/Could_not_load_host_key:___47__etc__47__ssh__47__ssh__95__host__95__ed25519__95__key/comment_1_a5fdd6df5bcfab832aa1721cad139de8._comment
new file mode 100644
index 00000000..080c9bc1
--- /dev/null
+++ b/doc/forum/Could_not_load_host_key:___47__etc__47__ssh__47__ssh__95__host__95__ed25519__95__key/comment_1_a5fdd6df5bcfab832aa1721cad139de8._comment
@@ -0,0 +1,7 @@
+[[!comment format=mdwn
+ username="gueux"
+ subject="comment 1"
+ date="2015-09-10T09:12:15Z"
+ content="""
+Any idea? This is quite annoying, as ssh_host_ed25519_key becomes unusable without a newline at the end of the file... Looking at Utility.PartialPrelude.readish, may it be the root of the issue?
+"""]]
diff --git a/doc/forum/Could_not_load_host_key:___47__etc__47__ssh__47__ssh__95__host__95__ed25519__95__key/comment_2_0197951e17a4a47cce74ce6cc4108d50._comment b/doc/forum/Could_not_load_host_key:___47__etc__47__ssh__47__ssh__95__host__95__ed25519__95__key/comment_2_0197951e17a4a47cce74ce6cc4108d50._comment
new file mode 100644
index 00000000..284fafbc
--- /dev/null
+++ b/doc/forum/Could_not_load_host_key:___47__etc__47__ssh__47__ssh__95__host__95__ed25519__95__key/comment_2_0197951e17a4a47cce74ce6cc4108d50._comment
@@ -0,0 +1,20 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 2"""
+ date="2015-09-10T21:00:46Z"
+ content="""
+If you look at `setPrivDataTo`, it explicitly chomps all trailing newlines
+from the value. I think that I did that because it's easy to accidentially
+add a newline you don't want when eg, pasting in a password.
+
+So, one solution might be to make --set --from-file load
+a file into privdata as-is. But, that seems like complication;
+you'd need to remember when to use it.
+
+I think it's better for the ssh property (and any other affected
+properties) to be changed, to add a final newline to the value from
+privdata when one is missing. Does this problem only affect ed25519
+keys, or others too? Only private keys or also public?
+
+I am currently extremely busy, so a patch would be great.
+"""]]
diff --git a/doc/forum/Could_not_load_host_key:___47__etc__47__ssh__47__ssh__95__host__95__ed25519__95__key/comment_3_1f6fdf9c03705665b3d7d1a562dfc2e2._comment b/doc/forum/Could_not_load_host_key:___47__etc__47__ssh__47__ssh__95__host__95__ed25519__95__key/comment_3_1f6fdf9c03705665b3d7d1a562dfc2e2._comment
new file mode 100644
index 00000000..f18273f2
--- /dev/null
+++ b/doc/forum/Could_not_load_host_key:___47__etc__47__ssh__47__ssh__95__host__95__ed25519__95__key/comment_3_1f6fdf9c03705665b3d7d1a562dfc2e2._comment
@@ -0,0 +1,9 @@
+[[!comment format=mdwn
+ username="gueux"
+ subject="comment 3"
+ date="2015-09-12T14:41:33Z"
+ content="""
+I'm not sure for the other key types, it affects ed25519 private keys (but not public keys), and apparently not rsa keys... But I'm not sure what other properties (present or future) would be affected: that seems like an ugly hack :(.
+
+Why not just removing the chomping stuff from setPrivDataTo? Pasting a password, pressing <enter>, and then <ctrl-D> is obviously different from pasting a password and pressing <ctrl-D>. Maybe another solution would be to print a warning with this information (\"do not press <enter>\" before <ctrl-D> unless you want to have a newline in your privdata\")?
+"""]]
diff --git a/doc/forum/Could_not_load_host_key:___47__etc__47__ssh__47__ssh__95__host__95__ed25519__95__key/comment_4_38e533c398521a2f1e02fde939f753e1._comment b/doc/forum/Could_not_load_host_key:___47__etc__47__ssh__47__ssh__95__host__95__ed25519__95__key/comment_4_38e533c398521a2f1e02fde939f753e1._comment
new file mode 100644
index 00000000..e51c5147
--- /dev/null
+++ b/doc/forum/Could_not_load_host_key:___47__etc__47__ssh__47__ssh__95__host__95__ed25519__95__key/comment_4_38e533c398521a2f1e02fde939f753e1._comment
@@ -0,0 +1,35 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 4"""
+ date="2015-09-15T00:29:47Z"
+ content="""
+I've fixed this bug. I thought about adding a type based
+validation when privdata is being set, but in the end decided against it
+for a couple reasons:
+
+* Doesn't fix existing privdata files.
+* The privdata file could be edited by the user, etc and the validation
+ wouldn't be run.
+* A user could just as well paste in a file and omit pasting the trailing
+ newline, so the validation would need to check if there was a trailing
+ newline when it's significant.
+* If the validation is by what the type of privdata is used for, this
+ disconnects the validation from the property that consumes the privdata.
+ Seems better to centralize all handling of a particular peice of privdata
+ in once place.
+* I was having some difficulty implementing it..
+
+Instead, I settled on making PrivData a newtype,
+and adding some accessor functions for it:
+
+ privDataLines :: PrivData -> [String]
+ privDataVal :: PrivDara -> String -- returned string never contains newlines
+
+This helps document the issue, and like `lines "a"` is the same as `lines
+"a\n"`, using privDataLines will give the same result whether the trailing
+newline was chomped or not. So, propellor no longer removes trailing newlines
+when the user is inputting privdata.
+
+The ssh property is adjusted to use privDataLines and add a trailing
+newline when writing files, and problem solved.
+"""]]