MacOs issues using caret in a SSH password

On my MacBook with macOS Big Sur and US-International PC as an input source, I am trying to connect by SSH client to remote computer that has a caret ^ (Shift+6) inside it's SSH password.

  • There is a key icon shown, and connection always fails, bad password.
  • After removing a caret from remote computrer password the connection is successful. So the caret is a problem reason for sure.
  • When typing password’s caret there is some sound like beep, bell, so caret probably has some special function that I do not about and want to turn off.
  • Typing caret inside classic terminal lines (outside of hidden password input) also has non-standard behavior, for example 'caret then a' shows 'a' with accent, without bell sound.

So how to turn off accents or something more that cause the problems? Or how to type it without changing settings (Double caret not working).


The better solution is to switch from the "US International - PC" input source to plain "US". If you enable multiple input sources (in System Preferences -> Keyboard pane -> Input Sources tab), you can select "Show Input menu in menu bar", and you'll get a menu bar item that lets you switch between them on the fly.

EDIT: the following method turns out not to work in many password entry situations, including ssh. So it's not useful in this particular situation, but I'm leaving it in case someone finds it useful in other situations.

If you are stuck with "US International - PC" and need to type one of the characters that it treats as a combining accent, just follow it by pressing the spacebar.

That is, in "US International - PC" mode:

  • ^a = "â"
  • ^E = "Ê"
  • ...etc...
  • ^Spacebar = "^"

The same applies to all of the other keys that "US International - PC" treats as combining accents: ~, `, ', and " -- if you want them as plain characters, follow them with a press of the Spacebar.


I found an answer that solved the problem finally in this link by user tertium on Stack Overflow.

The same problem is at any password input on web too.

Solution like the link says is: Use “U.S.” instead of “US International - PC” keyboard input source.

For temporary solution without changing settings, as user dirct suggested in comment, copying caret from web and Command+V pasting to SSH password input works well too. copy-paste source can not be own text typed with two caret and backspace, because it is wrong UTF char ˆ instead of correct ^.