SFTP without password prompt (from linux to windows)

29

ssh keys are the same kind of object on unix and windows - there are two types of keys: rsa, dsa. Generally speaking rsa will work on either ssh 1 or ssh 2, so consider the key type of rsa if you are asked.

Generate the key, on linux with ssh-keygen: http://rcsg-gsir.imsb-dsgi.nrc-cnrc.gc.ca/documents/internet/node31.html

There will be two files created: public key, private key. Make sure protections are 755 on (example home directory) /home/m4n07, and 600 on /home/m4n07/.ssh after you have your key made.

The public key .ssh/id_rsa.pub has to be placed on the Windows box. As a binary copy. Read the freeFTPd doc to find out where you place the file on your windows box, and what you name it. Example: We have a non-standard sftp windows implementation that uses the registry for ssh keys.

Share:
29

Related videos on Youtube

Juliyanage Silva
Author by

Juliyanage Silva

Updated on September 18, 2022

Comments

  • Juliyanage Silva
    Juliyanage Silva over 1 year

    I have below table : enter image description here

    What I want to do is deduct one hour from time difference of "punch_in_utc_time" and "punch_out_utc_time" if it is above 5hrs and this should only be done once if we have multiple records per day having time difference above 5hrs. Also need to skip the deduction if it has "1" for "has_overnight_shift". After doing all these manipulations I need to "group by" by "employee_id" as well. I could deduct one hour from all the records but not only once per day. Could you help me out..?

    If you need csv data :

    "1","54","2017-10-05 12:30:00",NULL,"5.5","2017-10-05 18:00:00","2017-10-05 18:29:00",NULL,"5.5","2017-10-05 23:59:00","PUNCHED OUT","0" "2","54","2017-10-05 18:30:00",NULL,"5.5","2017-10-06 00:00:00","2017-10-06 00:30:00",NULL,"5.5","2017-10-06 06:00:00","PUNCHED OUT","1" "3","54","2017-10-06 02:30:00",NULL,"5.5","2017-10-06 08:00:00","2017-10-06 06:30:00",NULL,"5.5","2017-10-06 12:00:00","PUNCHED OUT","0" "4","54","2017-10-07 00:30:00",NULL,"5.5","2017-10-07 06:00:00","2017-10-07 06:30:00",NULL,"5.5","2017-10-07 12:00:00","PUNCHED OUT","0" "5","54","2017-10-07 07:30:00",NULL,"5.5","2017-10-07 13:00:00","2017-10-07 13:30:00",NULL,"5.5","2017-10-07 19:00:00","PUNCHED OUT","0" "6","54","2017-10-08 02:30:00",NULL,"5.5","2017-10-08 08:00:00","2017-10-08 04:30:00",NULL,"5.5","2017-10-08 10:00:00","PUNCHED OUT","0" "7","54","2017-10-08 05:30:00",NULL,"5.5","2017-10-08 11:00:00","2017-10-08 06:30:00",NULL,"5.5","2017-10-08 12:00:00","PUNCHED OUT","0" "8","54","2017-10-08 07:30:00",NULL,"5.5","2017-10-08 13:00:00","2017-10-08 09:30:00",NULL,"5.5","2017-10-08 15:00:00","PUNCHED OUT","0" "9","54","2017-10-15 12:30:00",NULL,"5.5","2017-10-15 18:00:00","2017-10-15 18:29:00",NULL,"5.5","2017-10-15 23:59:00","PUNCHED OUT","0" "10","54","2017-10-15 18:30:00",NULL,"5.5","2017-10-16 00:00:00","2017-10-16 00:30:00",NULL,"5.5","2017-10-16 06:00:00","PUNCHED OUT","1" "11","54","2017-10-16 02:30:00",NULL,"5.5","2017-10-16 08:00:00","2017-10-16 06:30:00",NULL,"5.5","2017-10-16 12:00:00","PUNCHED OUT","0" "12","54","2017-10-17 00:30:00",NULL,"5.5","2017-10-17 06:00:00","2017-10-17 06:30:00",NULL,"5.5","2017-10-17 12:00:00","PUNCHED OUT","0" "13","54","2017-10-17 07:30:00",NULL,"5.5","2017-10-17 13:00:00","2017-10-17 13:30:00",NULL,"5.5","2017-10-17 19:00:00","PUNCHED OUT","0" "14","54","2017-10-18 02:30:00",NULL,"5.5","2017-10-18 08:00:00","2017-10-18 04:30:00",NULL,"5.5","2017-10-18 10:00:00","PUNCHED OUT","0" "15","54","2017-10-18 05:30:00",NULL,"5.5","2017-10-18 11:00:00","2017-10-18 06:30:00",NULL,"5.5","2017-10-18 12:00:00","PUNCHED OUT","0" "16","54","2017-10-18 07:30:00",NULL,"5.5","2017-10-18 13:00:00","2017-10-18 09:30:00",NULL,"5.5","2017-10-18 15:00:00","PUNCHED OUT","0" "17","54","2017-10-19 12:30:00",NULL,"5.5","2017-10-19 18:00:00","2017-10-19 18:29:00",NULL,"5.5","2017-10-19 23:59:00","PUNCHED OUT","0" "18","54","2017-10-19 18:30:00",NULL,"5.5","2017-10-20 00:00:00","2017-10-20 00:30:00",NULL,"5.5","2017-10-20 06:00:00","PUNCHED OUT","1" "19","54","2017-10-20 02:30:00",NULL,"5.5","2017-10-20 08:00:00","2017-10-20 06:30:00",NULL,"5.5","2017-10-20 12:00:00","PUNCHED OUT","0" "20","54","2017-10-21 00:30:00",NULL,"5.5","2017-10-21 06:00:00","2017-10-21 06:30:00",NULL,"5.5","2017-10-21 12:00:00","PUNCHED OUT","0" "21","54","2017-10-21 07:30:00",NULL,"5.5","2017-10-21 13:00:00","2017-10-21 13:30:00",NULL,"5.5","2017-10-21 19:00:00","PUNCHED OUT","0" "22","54","2017-10-22 02:30:00",NULL,"5.5","2017-10-22 08:00:00","2017-10-22 04:30:00",NULL,"5.5","2017-10-22 10:00:00","PUNCHED OUT","0" "23","54","2017-10-22 05:30:00",NULL,"5.5","2017-10-22 11:00:00","2017-10-22 06:30:00",NULL,"5.5","2017-10-22 12:00:00","PUNCHED OUT","0" "24","54","2017-10-22 07:30:00",NULL,"5.5","2017-10-22 13:00:00","2017-10-22 09:30:00",NULL,"5.5","2017-10-22 15:00:00","PUNCHED OUT","0"

    Thanks in Advance.

    • Fahad Anjum
      Fahad Anjum over 6 years
      Expected output will help more here. And try to put actual data instead of image. It will help us to make dummy query.
    • Juliyanage Silva
      Juliyanage Silva over 6 years
      Added csv data here.
    • philipxy
      philipxy over 6 years
      Please look at the formatted version of your post, below the editing window, and edit appropriately. Please read & act on minimal reproducible example--which includes an executable example with specification, and using text, not images/links, for text (including tables). Also How to Ask & hits googling 'stackexchange homework'--including showing what you have been able to do.