1

We recently started using long passwords for all our logins, it took everyone a bit to get used to but I have noticed that ssh doesn't work when the password has a has space in it.

Is there a way to use long ssh passwords containing spaces?

Usually when I enter a wrong password it closes the connection after 3 tries but when I enter the right password which has space in it, it keeps prompting me for a password unless or until I cancel it.

Example: When I type ssh <user>@<hostname / IP> it asks for password and I input something like I am superuser (This is the right password)and press enter. It prompts for password again. I do this n number of times and it prompts for password but if I type something like NewPass three times the connection closes because obviously that's wrong password. I have not tried this with wrong "passphrase" or in my case, password with spaces.

DarkDead
  • 11
  • 2
  • 1
    When you say passphrases, do you mean private/public keys where the key has a passphrase? What OS? – davidgo Feb 17 '23 at 04:37
  • OpenSSH in its documentation and messages uses the word "password" for a string that gives access to a server, "passphrase" for a string that gives access to a key. I observed there are people who use the word "password" for both. IMO calling the passphrase "password" is technically wrong. It seems you used the terms as if they were synonyms. Is the question about passwords? or passphrases? or both? – Kamil Maciorowski Feb 17 '23 at 04:37
  • @davidgo The server is on-prem and has no outside access only LAN access so we haven't setup ssh keys just a passphrase. – DarkDead Feb 17 '23 at 13:03
  • @KamilMaciorowski Sorry about that. Apart from the title of the post I have not used the words synonymously – DarkDead Feb 17 '23 at 13:04
  • 1
    I can connect to a SSH server using a password containing a space just fine. Could you please edit your question and add the exact procedure you use to connect to the server? – mashuptwice Feb 17 '23 at 13:12
  • I mofified the question to talk about passwords. Per ssh documentation passphrases apply to public keys, passwords imply no public key. – davidgo Feb 17 '23 at 18:01
  • I have modified my question again. There's no ssh key setup. – DarkDead Feb 20 '23 at 11:35

0 Answers0