Showing posts with label SFTP. Show all posts
Showing posts with label SFTP. Show all posts

Saturday, February 20, 2021

How to generate a code from WinSCP

Generate session URL/code dialog is used to generate a session URL, a file URL or a code template.

To open the dialog to generate the session URL or code, use:

  • Session > Generate Session URL/Code command on the main window to generate session URL or code template for the current session. (preferred)

  • Manage > Generate Session URL/Code command on the Login dialog to generate session URL or code template for the selected site.


Cheers!
Uma

Thursday, August 6, 2020

How to give read only permission to the Public and Private keys for SFTP in Windows 10

In Linux command, chmod 400 file is used to protect a file against accidental overwriting. 

In windows you can use icacls command

https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/icacls

In this case, let see how to give read only permission to .pub file

C:\WINDOWS\system32>cd c:\Keys


c:\Keys>icacls.exe id_rsa.pub /reset

processed file: id_rsa.pub

Successfully processed 1 files; Failed processing 0 files


c:\Keys>icacls.exe id_rsa.pub /grant:r "%Username%":"(R)"

processed file: id_rsa.pub

Successfully processed 1 files; Failed processing 0 files


c:\Keys>icacls.exe id_rsa.pub /inheritance:r

processed file: id_rsa.pub

Successfully processed 1 files; Failed processing 0 files

You can do the same for Private key and share the Public key and your IP address to get permission from the SFTP host. Once the permission is granted check the connection.

c:\Keys>sftp -i id_rsa <SFTP username>@<SFTP Host IP>

c:\Keys>exit

Cheers!
Uma

Saturday, May 16, 2020

How to get SSH key in WinSCP

Once you connect to the SFTP server, go to session and click on Server/Protocol Information

Cheers!
Uma