Ssh-copy-id not working in cygwin

linux

#1

Hi, I installed cygwin in my windows machine. For some reason the setup is different from the workshop video linux.

  1. My home directory is /cygdrive/c/Users/Sumit/Documents
  2. I dont have my user directory in /home
  3. No hidden files (.profile, .bashrc etc) present in /home directory instead that is present in /etc
  4. when i installed ssh package. I could generate key using ssh-keygen but then ssh-copy-id is giving below error
    a. I create a directory with name Sumit in /home so that ssh-keygen can create key in default path /home/Sumit/.ssh

Could you please help with proper cygwin installation?


#2

Your setup is perfectly fine. We will see what the issue is.
Try to do it for gw01.itversity.com

Also if you could not copy it is not show stopper for now. You just have to copy paste the password.


#3

@s23711 After ssh-keygen go to the location under cygwin directory /home/localuser/.ssh/ then use the ssh-copy-id like below

ssh-copy-id -i id_rsa username@gw01.itversity.com

please refer below screen shot. Let us know the status.


Password less login issue
Password less login issue
#4

Getting a different error now. Unable to authenticate host and mktemp failed


#5

@s23711 Please use your username@gw01.itversity.com

ssh-copy-id -i id_rsa sumitsh******@gw01.itversity.com


#6

still mktemp error

i used correct my id (shown as * below)

Sumit@DESKTOP-32C8N55 /cygdrive/c/cygwin64/home/Sumit/.ssh
$ ssh-copy-id -i id_rsa ************@gw01.itversity.com
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "id_rsa.pub"
mktemp: failed to create file via template ‘/cygdrive/c/Users/Sumit/Documents/.ssh/ssh-copy-id_id.XXXXXXXXXX’: No such file or directory
/usr/bin/ssh-copy-id: ERROR: mktemp failed


Not able to ssh into server. Could you please copy id_rsa to authorized_keys
#7

@s23711 Issue has taken care already. User able to login from cygwin.
We have manually copied contents of public key (id_rsa.pub) to authorized_keys.


#8