2

As part of a sort of esoteric "hack" I'm putting together, I've modified my /etc/passwd and /etc/shadow files to result in a user called ニエット ("Niet") with a shell pointing to a custom script I have written.

This all works great, and I can do:

ssh ニエット@localhost

Enter the password, log in, and I get the output of my custom script (currently just "Hello, World!", wait five seconds, then disconnect).

It works beautifully!

There's only one problem. I can't seem to SSH in directly from tools like PuTTY. In fact, the only way I've been able to connect is by SSHing in to my normal user, then doing the ssh to localhost as above.

I have tried putting ニエット@example.com in the "hostname" field and similarly in the "autologin username" option, but both result in trying to log in as ???? which obviously fails. This is in spite of ensuring the character encoding is set to UTF-8.

Similarly, I've tried not using auto-login, but... well...

login as: ▒▒▒▒
▒▒▒▒@example.com's password:
Access denied

Not quite what I'm after.

I am well aware that what I have done with this username is a complete hack and I should probably be hit with a brick for it. But it does work, I just seem to be having a problem with my computer's PuTTY communicating with the server, since the server is perfectly able to communicate with itself.

Am I missing an option or something to make this work?

0

The reason it isn't working is because you need to have a compatible character set on both sides. Since the SSH username isn't established based on glyphs, but on the actual real binary value.

The best suggestion I can give is to try to use UTF-8 on both sides. Use a hex editor to display the hex values on the windows side and on the unix side. Make sure they match. If they don't then it can't work.

But more generally, what exactly are you trying to do? If you're trying to make a "secret" user, you'd be much better off (and more secure) to create an ordinary use with a 7-bit ascii user name with a disabled password and a key for logins.

  • The intention is to be a sort of easter-egg. It would be presented as a thing like "haha, with a username like ニエット I don't even need a password!" -- "But you have to put something. Lemme guess, it's password" -- "Don't be silly, it's notpassword" (with the lack of a space being the hint to it being, literally, notpassword). I'm using a custom script as the shell so it can't actually do anything except navigate the minigame. If a UTF-8 username isn't possible, I suppose I'll have to go for a more "standard" username and "accidentally" publish the password. – Niet the Dark Absol Jun 8 '14 at 18:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.