Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

junknav

Re: winscp commandline key authentication to an openssh serv

junknav wrote:

HI GUys,

Can someone explain clearly how to make key authentication work with an openssh server. I have tried pageant. PuttyGen there was an option to convert the key but pageant doenst take that key.

I am doing something wrong.

Help!


SOrry! Figured out the problem. I has copy paste the openssh version 1 key which is displayed on the generate screen. Initially i was trying with key that i got from clicking the save public key button and then realized that my server is less than version 2
junknav

winscp commandline key authentication to an openssh server

HI GUys,

Can someone explain clearly how to make key authentication work with an openssh server. I have tried pageant. PuttyGen there was an option to convert the key but pageant doenst take that key.

I am doing something wrong.

Help!
p1c0

Sorry, i've just found the solution!!

Now i'am searching about how to store a session... I will ask you if i don't find!! :)
martin

-h option is used to set key of the server, not of the user! Key of the user is usually stored into /home/username/.ssh/authorized_keys. You do not need to restart the sshd when you update the user keys.
p1c0

Sorry, i have forgotten to log in before post my reply! :?
Guest

I've just try to do this but it doesn't work...

I have generated two key (public and private) with puttygen.exe. I have uploaded the public key on the box where i have the ssh server (openSSH-4.0p1) but when i try to start sshd, it can't read the key...

# /usr/sbin/sshd -h /etc/ssh/public_key -d

debug1: sshd version OpenSSH-4.0p1
debug1: PEM_read_PrivateKey failed
debug1: read PEM private key done : type <unknown>
Could not load host key: /etc/ssh/public_key
Disabling protocol version 1. Could not load host key
Disabling protocol version 2. Could not load host key
sshd: no hostkeys available -- exiting


I suppose that putty keys are not compatible with OpenSSH?!? Is there a solution?? Should i use an other ssh server?

Thanks a lot!
martin

Re: Key authentification with command line

You can create stored session with associated key and open that session.

The next version will allow passing of private key from command line.
p1c0

Key authentification with command line

Hi,

i try to use winscp3 with a script and it work well with user:password@server:port but i want to use key authentification...

Is it possible with command line? How should i proceed? :?

Thanks a lot in advance.

p1c0