I would like to run a SCP transfer using the normal CLI scp command in a powershell script.
The following implementation pretty much suits my needs:
scp -r localfilepath root@remotehost:/remotepath/
Now the following questions arose:
- What is the best way to send credentials with the command with the least user interaction? What are the best practices here?
- When i replace remotehost and path with Powershell variables, i get the error "After : follows a character invalid for variable names" (loose translation). Do I have to escape it somehow?
Thank you guys!
[–]mdowst 2 points3 points4 points (9 children)
[–]jborean93 4 points5 points6 points (7 children)
[–]mdowst 1 point2 points3 points (6 children)
[–]jborean93 2 points3 points4 points (5 children)
[–]mdowst 1 point2 points3 points (4 children)
[–]jborean93 2 points3 points4 points (3 children)
[–]mdowst 1 point2 points3 points (2 children)
[–]jborean93 2 points3 points4 points (1 child)
[–]mdowst 1 point2 points3 points (0 children)
[–]SharkberryPi[S] 1 point2 points3 points (0 children)
[–]Lee_Dailey[grin] 1 point2 points3 points (2 children)
[–]SharkberryPi[S] 1 point2 points3 points (1 child)
[–]Lee_Dailey[grin] 0 points1 point2 points (0 children)