OpenSSH for MS Windows

I have managed to install OpenSSH, but I am not sure where to put the keys in order to do passwordless login.
Now when I log in at the system, my home directory is users/user.domain, but when i log in using sftp, my home directory is users/user,
I used the instructions from here:
https://winscp.net/eng/docs/guide_windows_openssh_server

Hi,
Do you see both directories when you search?
Do they both have the same content, and is one a link to the other?
When you say log in to your system, are you talking of your PC or is it a windows server as you used / delimiter for you home directory, and so not very Windows native behaviour so wondering if not an "extension" added by some software

Yes I see both directories.
They do not have the same content.
Should have used a backslash, / is just habit.
I can access the system on the weekend but only through ssh, so I can't try what I just thought of, and that is if I can access both directories by logging in at the console using both user and user.domain.

Still not clear to me what is your system:
The remote host you are trying to access (what OS?) or your PC/laptop ( Windows?)

The workstation is Windows 10Pro, and the remote system is SCO Openserver 6. I want to transfer files from SCO to the Win10 system because SCO Samba is only version 3 and supports SMB1 protocol only. I can currently use sftp to transfer files, but only if I enter the user and password.

1 Like

So you can now connect to your SCO using ssh but with passwd and you end in /users/user.domain, from your WinPC? Is that so?
Then you should put the keys in .ssh dir found there I suppose... The tricky bit is more windows side I believe as I remembered it was not all that obvious, only last time I touch my PC at work was 3 years ago...

Just so we are absolutely clear, I want to have a batch script on the SCO machine transfer files to the Win10 machine, and then share the files on the Win10 machine with the network, and thus eliminate Samba on the SCO machine.

Hello,

It's been some time indeed since I used Windows on a day-to-day basis, but if you have installed the OpenSSH client utilities such as ssh, scp and sftp on your Windows workstation, then the location for your private and public keys would normally be C:\Users\<your username>\.ssh\ . That's the directory that should contain (for example, in the case of an RSA key) your id_rsa and id_rsa.pub files.

In terms of permissions and ownerships, I can't give precise or specific advice, other than to say I'd strongly suspect that it's important that you are the only local or domain user with write, modify, change or full control access to the .ssh directory and its contents. If any other user (maybe even including things like SYSTEM) has any kind of write access to that directory and its contents, it's likely that your keys will not be usable for authentication purposes.

Now as I say, this is all just based on my previous experience, and I have no current Windows system I can test any of this on. But if you put your keys in that location on your Windows box, and then add the contents of your public key to the ~/.ssh/authorized_keys file of the account that you want to SSH into on the SCO server, then (hopefully) that should do the trick.

If not, or if you have any further questions, please let us know what isn't working, including the full text of any relevant errors and a full description of all paths, permissions and other relevant information regarding the files you are using, and we can take things from there.

See Also:

1 Like