
RSA key fĪt .checkHost(Session.java:805)Īt .connect(Session.java:345)Īt .connect(Session. If its enabled I get the following error : : UnknownHostKey: ******. The SSH connection is successfully established as "StrictHostKe圜hecking" is disabled.

config = new () Ĭonfig.put("StrictHostKe圜hecking", "no") ĬhannelSftp sftpChannel = (ChannelSftp) session.openChannel("sftp") Session session = jsch.getSession(user, host, port)

String privateKey = "***.ppk" //Path to private key(The file is in. Ĭould you check in your bash session (so not CMD) what value your $HOME environment variable is set? ~/.I am using Jsch(Jcraft) library to establish a SSH connection with a SSH server as shown below : JSch jsch = new JSch() Enter the following cmdlet to install the OpenSSH module. This article shows you how to create and use an SSH RSA public-private key file pair for SSH client connections. rw-r-r- 1 VonC Administ 1675 Jun 19 16:14 id_rsaĭrwxr-xr-x 2 VonC Administ 0 Jun 19 16:14. Log in to the Windows computer with an admin-level account and launch PowerShell with admin privileges. Applies to: Linux VMs Flexible scale sets With a secure shell (SSH) key pair, you can create a Linux virtual machine that uses SSH keys for authentication. Your public key has been saved in /c/Users/VonC/.ssh/id_rsa.pub.

Your identification has been saved in /c/Users/VonC/.ssh/id_rsa. That will create a %USERPROFILE%\.ssh\mykey and %USERPROFILE%\.ssh\mykey.pub.Īs a test, I just created my key without any problem (Seven Ultimate 64bits, msysgit 1.6.gcd48) $ ssh-keygen -C -t rsaĮnter file in which to save the key (/c/Users/VonC/.ssh/id_rsa):# just press enterĮnter passphrase (empty for no passphrase): You can use (from CMD or bash) ssh-keygen -C -t rsa -P "" -f ~/.ssh/mykey Make sure you do not have a Windows environment variable named HOME, which would take precedence when using ssh.exe or ssh-keygen.exe commands from a CMD session (as opposed to a bash session). You can start with creating the expected folder, and check you can access it: mkdir "%USERPROFILE%\.ssh"
