Showing posts with label windows. Show all posts
Showing posts with label windows. Show all posts

PSFTP from windows server to Linux server with key authentication


From windows server:
Download puttygen.exe, putty.exe, and psftp.exe
Run puttygen.exe to generate a private key, grep the public key generated and put into the Linux server’s authorized_keys file.


Use putty to save a session of the Linux server that you want to connect, remember to put in the username to connect.
Create a file containing the command that you want to execute; we will download “install.log” from 
Linux server in our example.
lcd C:\Users\Anthony\Documents\work\test
cd /root
get install.log
quit
You may now run manually to test the script, and may add to scheduler later.
Syntax: psftp.exe -b

Remove partitions in USB Pendrive

You can do this by using diskpart on Windows:
  1. Open an elevated command prompt.
  2. Run diskpart
  3. list disk
  4. Note the disk number that corresponds to your USB drive (it should be obvious going by size)
  5. select disk X where X is the number from step 4
  6. list partition - There should be two, numbered 0 and 1, each about 7 GB
  7. select partition 0
  8. delete partition
  9. select partition 1
  10. delete partition
  11. create partition primary
  12. exit
  13. Exit Command Prompt (type exit or just close the window)
  14. In Windows, go to Computer and try to open the disk. It will ask you to format it.
  15. Format it with the default settings and give it a name if you want