I heard sftp is not support at .NET Framework. But we can find and use Open source software or dll. I got sample code SharpSSH - A Secure Shell (SSH) library for .NET
http://www.tamirgal.com/blog/page/SharpSSH.aspx. I need to upload file using sftp. Other site gave to me host, userid and private key. I believe that key is generated by "PuTTY" key generator and
generated it. But "SharpSSH" is not support it. SharpSSH is support "RSA, DSA".
Can i convert "PuTTY Key" to SSH(RSA) using with "PuTTY" key generator and use it at SharpSSH. If i convert it what is different of security between "PuTTY Key" and SSH Key.
Others any sample of sftp. Kindly provide to me. If i wrong please correct to me.
There is no "PuTTY Key". The PuTTY Key Generator generates 3 types of keys, SSH-1 (RSA), SSH-2 RSA, and SSH2-2 DSA. It looks as though you have an ssh-rsa key from what you posted which is supported by SharpSSH. Have you tried to use the key using their
SSH file transer example found here?
Thanks for your reply. I solved this way. Load my ppk to PuTTY Key Gen. And then i export to OpenSSH. After that SharpSSH is work with my exported file.
Thanks and Regards,
Yukon
Make Simple & Easy
Marked as answer by yukon on Jan 31, 2013 11:17 AM
yukon
Member
29 Points
42 Posts
SFTP and Public Key Problem
Jan 25, 2013 06:30 AM|LINK
Hi Team,
I heard sftp is not support at .NET Framework. But we can find and use Open source software or dll. I got sample code SharpSSH - A Secure Shell (SSH) library for .NET http://www.tamirgal.com/blog/page/SharpSSH.aspx. I need to upload file using sftp. Other site gave to me host, userid and private key. I believe that key is generated by "PuTTY" key generator and generated it. But "SharpSSH" is not support it. SharpSSH is support "RSA, DSA".
Can i convert "PuTTY Key" to SSH(RSA) using with "PuTTY" key generator and use it at SharpSSH. If i convert it what is different of security between "PuTTY Key" and SSH Key.
Others any sample of sftp. Kindly provide to me. If i wrong please correct to me.
Sample Key.
PuTTY-User-Key-File-2: ssh-rsa
Encryption: none
Comment: rsa-key-20130123
Public-Lines: 1
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Private-MAC: xxxxxxxxxxxxxxx
Best Regards,
Yukon
jprochazka
Contributor
4992 Points
748 Posts
Re: SFTP and Public Key Problem
Jan 25, 2013 07:39 PM|LINK
There is no "PuTTY Key". The PuTTY Key Generator generates 3 types of keys, SSH-1 (RSA), SSH-2 RSA, and SSH2-2 DSA. It looks as though you have an ssh-rsa key from what you posted which is supported by SharpSSH. Have you tried to use the key using their SSH file transer example found here?
http://sharpssh.cvs.sourceforge.net/viewvc/sharpssh/SharpSSH/Examples/sharpssh_samples/
yukon
Member
29 Points
42 Posts
Re: SFTP and Public Key Problem
Jan 31, 2013 11:17 AM|LINK
Hi jprochazka,
Thanks for your reply. I solved this way. Load my ppk to PuTTY Key Gen. And then i export to OpenSSH. After that SharpSSH is work with my exported file.
Thanks and Regards,
Yukon