# Connect # open sftp://username:password@example.com/ -hostkey="ssh-rsa 2048 xxxxxxxxxxx..." # # In exceptional situations, when security is not required, such as when connecting # within a trusted private network, you can use -hostkey=* or # SessionOptions.GiveUpSecurityAndAcceptAnySshHostKey to blindly accept any host key. # Eg: open sftp://username:password@example.com/ -hostkey=SessionOptions.GiveUpSecurityAndAcceptAnySshHostKey # #open sftp://mayr@circ.cs.southern.edu/ -hostkey="ssh-rsa 2048 xxxxxxxxxxx..." #open sftp://mayr@circ.cs.southern.edu/ -hostkey=SessionOptions.GiveUpSecurityAndAcceptAnySshHostKey #open sftp://mayr@circ.cs.southern.edu/ -privatekey="C:\xampp\ssh\key-priv.ppk" # # First time only, to get fingerprint hostkey #open sftp://mayr@circ.cs.southern.edu/ # # Preferred method #open sftp://mayr@circ.cs.southern.edu/ -hostkey="ssh-ed25519 255 C4fr1Ist2z6DZM3kCc6FV2ylHuVgC/2xxz9CmA778zM" (deprecated) #open sftp://mayr@67.207.85.167/ -hostkey="ssh-ed25519 255 wlKwfmOwi7TPzxzlCR7Tq9g3OtQECM+qd8zUB+8A+5s" #open sftp://mayr@circ.cs.southern.edu/ -hostkey="ssh-ed25519 255 wlKwfmOwi7TPzxzlCR7Tq9g3OtQECM+qd8zUB+8A+5s" open sftp://mayr@circ.cs.southern.edu:2006/ -hostkey="ssh-ed25519 255 wlKwfmOwi7TPzxzlCR7Tq9g3OtQECM+qd8zUB+8A+5s" echo # Info echo ### Processing data on %TIMESTAMP#yyyy-mm-dd% ### echo # Start in batch mode (no prompts) #option batch # skip errors option batch continue option confirm off #option reconnecttime 120 #option echo off #option failonnomatch off echo # Create remote directory # Fails if dir already exists # Workaround: redirect the error output to nul (2>/dev/null) or to the standard output (2>&1) echo Remote directory: pwd echo #mkdir t/crm mkdir t/%PROJ% echo # Change remote directory to t/crm echo Changing remote directory: #cd t/crm cd t/%PROJ% echo # Upload the file to current working directory echo Uploading files: #put %PROJ%-bak-all.zip put %PROJ%-bak-src-%TIMESTAMP#yyyymmdd%.zip ls echo # Disconnect close # Exit WinSCP exit