I have the public key with me(the pub file), for using sftp with public key authentication mode. How do i use sftp command for testing transfer file from my machine to the sftp server. For username and password authentication, I can transfer the files. However not sure on the commands and configuration we should use for sftp in public key authentication mode. The public key is a .pub extension file, starting with 'ssh-dss'. I have winscp and putty.
Also how do I check for the logs/reasons in case if the file transfer is a failure. I undertstand that the settings at the server side should also be proper.