I'm trying to execute the below command on my new MacBook and was getting the '-bash: sudo scp: command not found' error. Please help me fixing this issue.
sudo scp -i Pem_File_Name.pem PHP_File_Name.php centos@Host_Path:/var/www/html/Folder_Name/
The Pen_File_Name, PHP_File_Name and Host_Path are replaced with their respected values.
Thanks in advance.
Geeth.
From the error, I'd guess that you have something other than a normal space (maybe a non-breaking space) between "sudo" and "scp". The reason I think this is that the error message says the command "sudo scp" was not found -- but the command should be "sudo" (which should then run "scp" as a separate command). This means that for some reason bash is treating "sudo scp" as a single word instead of two.