Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'code 275: unknown command' with password encrypt on centos over ssh #345

Open
ghost opened this issue Oct 7, 2022 · 3 comments
Open

'code 275: unknown command' with password encrypt on centos over ssh #345

ghost opened this issue Oct 7, 2022 · 3 comments

Comments

@ghost
Copy link

ghost commented Oct 7, 2022

Environment

  • OS: CentOS 7
  • rage version: 0.8.1

What were you trying to do

On Linux (Linux host.....com 3.10.0-1160.71.1.el7.x86_64 #1 SMP Tue Jun 28 15:37:28 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux)...

I type:

rage -p -o hello.txt.age hello.txt

What happened

I get only this on the CLI. I'm SSH'd to centos from macos (where the command works fine). hello.txt has 0664 permissions and full ownership (and there's a different error anyway when the file doesn't exist):

Error: Code 275: unknown command

[...]$ rage -p -o hello.txt.age hello.txt
Error: Code 275: unknown command
@kralo
Copy link

kralo commented Jan 5, 2025

I have the same problem, freshly built from git:

[pc rage]$ target/debug/rage -d -o unenc /tmp/testerle2.age 
Error: Code 275: unknown command

[ Did rage not do what you expected? Could an error be more useful? ]
[ Tell us: https://str4d.xyz/rage/report                            ]
[pc rage]$ target/debug/rage --version
rage 0.11.1

@kralo
Copy link

kralo commented Jan 5, 2025

I had old pinentry on the pc (i can't change the OS).

$ /usr/bin/pinentry --version
pinentry-curses (pinentry) 0.8.1

it works with fallback CLI input, i.e. prepend PINENTRY_PROGRAM="" rage -i ...

strace for when it fails:

[pid 17402] write(5, "SETPROMPT Passphrase\n", 21 <unfinished ...>
[pid 17403] <... read resumed>"SETPROMPT Passphrase\n", 1002) = 21
[pid 17402] <... write resumed>)        = 21
[pid 17403] write(1, "OK", 2 <unfinished ...>
[pid 17402] read(6,  <unfinished ...>
[pid 17403] <... write resumed>)        = 2
[pid 17402] <... read resumed>"OK", 8192) = 2
[pid 17403] write(1, "\n", 1 <unfinished ...>
[pid 17402] read(6,  <unfinished ...>
[pid 17403] <... write resumed>)        = 1
[pid 17402] <... read resumed>"\n", 8192) = 1
[pid 17403] read(0,  <unfinished ...>
[pid 17402] write(5, "SETTIMEOUT 30\n", 14 <unfinished ...>
[pid 17403] <... read resumed>"SETTIMEOUT 30\n", 1002) = 14
[pid 17402] <... write resumed>)        = 14
[pid 17403] write(1, "ERR 83886355 unknown command", 28 <unfinished ...>
[pid 17402] read(6,  <unfinished ...>
[pid 17403] <... write resumed>)        = 28
[pid 17402] <... read resumed>"ERR 83886355 unknown command", 8192) = 28
[pid 17403] write(1, "\n", 1 <unfinished ...>
[pid 17402] read(6,  <unfinished ...>
[pid 17403] <... write resumed>)        = 1
[pid 17402] <... read resumed>"\n", 8192) = 1
[pid 17403] read(0,  <unfinished ...>
[pid 17402] write(5, "BYE\n", 4 <unfinished ...>

@pepa65
Copy link

pepa65 commented Jan 6, 2025

I think the best solution is to put the pinentry behind a feature, and by default not use the feature.

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

No branches or pull requests

2 participants