[GH-ISSUE #285] Can't paste public key for accountCreate #71

Closed
opened 2026-05-07 00:18:24 +02:00 by BreizhHardware · 4 comments

Originally created by @verbozh on GitHub (Jan 17, 2022).
Original GitHub issue: https://github.com/ovh/the-bastion/issues/285

Hi, I am testing your bastion and when I do an accountCreante --account NAME --uid-auto and then it asks me to paste the public key by right clicking (WSL2) I can't do anything. I tried to paste it somewhere else and it works without problem, any idea how to counter this problem ?

Originally created by @verbozh on GitHub (Jan 17, 2022). Original GitHub issue: https://github.com/ovh/the-bastion/issues/285 Hi, I am testing your bastion and when I do an accountCreante --account NAME --uid-auto and then it asks me to paste the public key by right clicking (WSL2) I can't do anything. I tried to paste it somewhere else and it works without problem, any idea how to counter this problem ?
Author
Owner

@speed47 commented on GitHub (Jan 18, 2022):

Hello,

When you paste the publickey, it's not displayed on the terminal, as the following message hints:

Please paste the SSH key you want to add. This bastion supports the following algorithms:
[...]
In any case, don't save it without a passphrase (your paste won't be echoed).

In most cases, just pasting the key will be enough, as it often contains a \n, but depending on how you copied it (and/or maybe WSL2 behaves a bit differently on this), if it doesn't contain a final \n they just press ENTER after pasting the key, it should work.

<!-- gh-comment-id:1015409087 --> @speed47 commented on GitHub (Jan 18, 2022): Hello, When you paste the publickey, it's not displayed on the terminal, as the following message hints: ``` Please paste the SSH key you want to add. This bastion supports the following algorithms: [...] In any case, don't save it without a passphrase (your paste won't be echoed). ``` In most cases, just pasting the key will be enough, as it often contains a `\n`, but depending on how you copied it (and/or maybe WSL2 behaves a bit differently on this), if it doesn't contain a final `\n` they just press ENTER after pasting the key, it should work.
Author
Owner

@verbozh commented on GitHub (Jan 24, 2022):

I know that when you paste the key it doesn't appear, but whether I paste it directly or use notepad++ to copy it and paste it into the bastion it doesn't change anything. It automatically generates another key. I also tried from different computers (one under windows and the other under ubuntu) but the problem remains the same. Is it possible that this is related to a problem during the installation ?

<!-- gh-comment-id:1019852459 --> @verbozh commented on GitHub (Jan 24, 2022): I know that when you paste the key it doesn't appear, but whether I paste it directly or use notepad++ to copy it and paste it into the bastion it doesn't change anything. It automatically generates another key. I also tried from different computers (one under windows and the other under ubuntu) but the problem remains the same. Is it possible that this is related to a problem during the installation ?
Author
Owner

@speed47 commented on GitHub (Jan 25, 2022):

I can't seem to be able to reproduce your problem, unfortunately :(
Could you maybe try again and copy/paste the entire output of your terminal here? Maybe that'll shed some light about what's happening exactly!

As a side note, you can also pass the public key as a parameter to accountCreate, with double quoting, such as:
$bastion --osh accountCreate --account name --auto-uid --public-key '"ssh-rsa ......"'

But in any case, I'm interested in the complete output if you can provide it.

<!-- gh-comment-id:1021169322 --> @speed47 commented on GitHub (Jan 25, 2022): I can't seem to be able to reproduce your problem, unfortunately :( Could you maybe try again and copy/paste the entire output of your terminal here? Maybe that'll shed some light about what's happening exactly! As a side note, you can also pass the public key as a parameter to accountCreate, with double quoting, such as: `$bastion --osh accountCreate --account name --auto-uid --public-key '"ssh-rsa ......"'` But in any case, I'm interested in the complete output if you can provide it.
Author
Owner

@speed47 commented on GitHub (Feb 23, 2022):

Closed for inactivity

<!-- gh-comment-id:1048735944 --> @speed47 commented on GitHub (Feb 23, 2022): Closed for inactivity
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/the-bastion#71
No description provided.