bitwiseworks / openssh-portable

Portable OpenSSH
Other
0 stars 0 forks source link

OpenSSH port to OS/2 problem with '~' in file names and with file permissions. #1

Open daa137 opened 5 years ago

daa137 commented 5 years ago

Your port of OpenSSH to OS/2 (openssh and openssh-clients, both 7.7p1-4 installed via the Arca Noae Package Manager) fails on eComStation 2.1 with nearly everything upgraded to the latest version:

[G:]ssh -l nesfa www.nesfa.org Could not create directory '/nonexistent/.ssh'. The authenticity of host 'www.nesfa.org (208.113.169.122)' can't be established.

ECDSA key fingerprint is SHA256:c34hMWVruPl4r/y7FTr19fI6dT0aEkMYK9nmYosTLDw. Are you sure you want to continue connecting (yes/no)? no Host key verification failed.

[G:]ssh -V OpenSSH_7.7p1, OpenSSL 1.0.2q 20 Nov 2018

[G:]echo %home% g:\users\dave

Before I upgraded a lot of software to current versions an older version of OpenSSH (5.3p1) worked, but it's especially weird that, when I eventually resorted to testing by restoring pre-upgrade backups, that older version failed in a similar way. (I restored both of my system/installed-software partitions but not my local-data partition.)

I've tried everything that I can think of, without success.

It appears that some shim between OS/2 and OpenSSH's native Un*x isn't properly handling filepaths starting with '~'.

One other issue is that if I uncomment the identity-file directives in the system ssh_config and replace '~' with 'g:/users/dave' SSH finds the identity files but I get these errors:

[G:]ssh -l nesfa www.nesfa.org Could not create directory '/nonexistent/.ssh'. key_load_public: invalid format The authenticity of host 'www.nesfa.org (208.113.169.122)' can't be established.

ECDSA key fingerprint is SHA256:c34hMWVruPl4r/y7FTr19fI6dT0aEkMYK9nmYosTLDw. Are you sure you want to continue connecting (yes/no)? yes Failed to add the host to the list of known hosts (/nonexistent/.ssh/known_hosts). @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: UNPROTECTED PRIVATE KEY FILE! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Permissions 0666 for 'g:/users/dave/.ssh/identity' are too open. It is required that your private key files are NOT accessible by others. This private key will be ignored. Load key "g:/users/dave/.ssh/identity": bad permissions @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: UNPROTECTED PRIVATE KEY FILE! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Permissions 0666 for 'g:/users/dave/.ssh/id_rsa' are too open. It is required that your private key files are NOT accessible by others. This private key will be ignored. Load key "g:/users/dave/.ssh/id_rsa": bad permissions nesfa@www.nesfa.org's password: Permission denied, please try again. nesfa@www.nesfa.org's password: Permission denied, please try again. nesfa@www.nesfa.org's password: Connection closed by 208.113.169.122 port 22

The multiple password requests are because ^C was ignored.

SilvanScherrer commented 5 years ago

please gimme the output of: yum list klusr openssh go to a cmdline and run the above command. And the copy paste the output please

daa137 commented 5 years ago

On Tue, 9 Jul 2019, Silvan Scherrer wrote:

please gimme the output of: yum list klusr openssh go to a cmdline and run the above command. And the copy paste the output please

That was quick. Thanks.

arcanoae-rel | 1.9 kB 00:00 arcanoae-rel/primary | 13 kB 00:00 netlabs-rel | 2.9 kB 00:00 netlabs-rel/primary_ | 2.0 MB 00:02 ] 361 kB/s | 1.7 MB 00:00 ETA Installed Packages klusrmgr.i686 1.2.1-1.oc00 installed

openssh.i686 7.7p1-4.oc00 installed

openssh-clients.i686 7.7p1-4.oc00 installed

Available Packages openssh.i386 5.9p1-1.oc00 netlabs-rel

openssh-clients.i386 5.9p1-1.oc00 netlabs-rel

openssh-debuginfo.i686 7.7p1-4.oc00 netlabs-rel

openssh-server.i386 5.9p1-1.oc00 netlabs-rel

openssh-server.i686 7.7p1-4.oc00 netlabs-rel

-- Dave Anderson dave@daveanderson.com

SilvanScherrer commented 5 years ago

the /nonexistent/ thinggy is fixable with klusrmgr. You should find an icon for klusrmgr on your desktop. There you can adjust the home directory for the user nesfa.

daa137 commented 5 years ago

On Wed, 10 Jul 2019, Silvan Scherrer wrote:

the /nonexistent/ thinggy is fixable with klusrmgr. You should find an icon for klusrmgr on your desktop. There you can adjust the home directory for the user nesfa.

'nesfa' is the remote user, I'm 'dave'.

I assume that you mean the icon labelled 'kLIBC User Management'.

That showed three users: root, dave, and guest. 'dave' already had 'home' set to 'g:\users\dave'. Just to be sure, I selected 'edit user', made no changes but selected 'OK', and saved the result. This did not change the SSH error. On spec, I also temporarily set 'home' for 'root' and 'guest' to 'g:\users\dave', saved the result, and tried SSH again -- I still got the same /nonexistent/ error.

-- Dave Anderson dave@daveanderson.com

SilvanScherrer commented 5 years ago

that's now completely strange. As I know I fixed all those issues some month ago. But now I see them also again on my local build. I need to investigate further.

explit7 commented 3 years ago

20210308_002833 I solved this problem with this workaround:

I opened klusr and pointed root and ssh to have it home folder under D:\ExPLIT (My Home Folder) Afterwards the problem was solved and known_hosts file could be created under Folder .ssh inside the Home Folder