Active 8 months ago. Viewed k times. Improve this question. Pradeep Pati 5, 2 2 gold badges 28 28 silver badges 42 42 bronze badges. Can you please tell me if using a password in shell script with rsync worked or if you tried that? Add a comment. Active Oldest Votes. Instead of hardcoding password in a shell script, use SSH keys, its easier and secure.
Improve this answer. Pradeep Pati Pradeep Pati 5, 2 2 gold badges 28 28 silver badges 42 42 bronze badges. Even after following these instructions, I am still prompted for a password ScottScooterWeidenkopf there could be a few things that could be wrong, like the. PradeepPati I figured out my problem. You're right, the problem was the permissions. In the link you provided, the author mentioned some permission changes. I made those changes, and now everything works. Just to help avoid confusion with copy-paste usage of this solution, currently this answer seems to transfer FROM remote TO local -- which is opposite to what the OP is looking to do.
Ciabaros good catch! I updated the answer. JohnA JohnA 1, 7 7 gold badges 28 28 silver badges 34 34 bronze badges. Note for windows users: The expect packaged in MSYS2 will match against the whole output, so the 1st rule will always be matched. If you exchange the order of both rules, you get the desired behaviour. Veerendra Kakumanu Veerendra Kakumanu 1, 4 4 gold badges 26 26 silver badges 49 49 bronze badges. Nice alternative to! It seems to work better for multiple files than scp IMHO.
The nice thing about scp ist that it uses a secure channel. Thanks, I was right in the middle of adding that update and got distracted. This will still invoke an interactive password prompt. Search and open 'optional feature' from start menu and then click on 'Add a feature' and search for 'OpenSSH Client' and click on install.
Now that you've enabled OpenSSH run ssh in windows terminal to verify it has been installed correctly. TBH, every time we want to log in, we have to enter the host name or location of private key or password. And now suddenly things don't seem direct and easy. Edit the code structure given below and save it in config file. Give it a friendly name, I've used 'wt' in the example, you will use this Host to login later.
You can use as many profiles as you want. Just put another profile in new line and make sure it is properly indented. If you are getting "Unprotected Private Key File" warning then make sure you have set the right permission for private key file.
Open the advanced file setting in security tab and click on 'Disable inheritance' button. Now click on 'Add' button to add a user for file permission. It has a good intuitive interface and gets the job done easily and with no pain. You can puth the full path or location in the path where the file is located. First you have to install any ssh client OpenSSH which support command line interface for your windows machine:.
WinSCP is definitely an useful utility, especially if you want a graphic interface. But if you're looking for a command line alternative without having to deal with installing cygwin, there's also pscp which is part of the PuTTY collection of tools. Instructions for installation are available from Microsoft's Docs site. Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group.
Create a free Team What is Teams? Learn more. SCP copy windows local file to linux remote folder Ask Question. Asked 7 years, 8 months ago. Active 7 months ago. Viewed k times. Improve this question. Looks like the slash after d: is the wrong way round? Add a comment. Active Oldest Votes.
Improve this answer.
0コメント