Single Blog

SCP (secure copy) to Linux Server Without Password

We can use below SCP command to transfer files:

scp -i mykey.pem somefile.txt root@servername-ip:/home/mentor/
Explanation:
scp is command in most of the linux falvours this is inbuilt command otherwise you can install using yum or apt-get as:
yum install scp
apt-get install scp
mykey.pem replace with your actual key, make sure you set permission as 400 for your .pem file using chmod 400 mykep.pem
somefile.txt replace with filename with your filename
root replace with username where your pem got associated
servername-ip replace with actual server name or ip address
/home/mentor replace with your remote path Note: Path should exists.

Comments (0)

Post a Comment