#log in
sftp leo@82.992.123.124
#after log in
# upload a file:
put test.txt
# download a file
get test.txt
# delete a file
rm test.txt
Directly copy file between the server and the local machine if can ssh to the server
# find server public ip: 100.31.47.111
# ssh to the server
ssh -i /Users/leo/path/noc.pem ec2-user@100.31.47.111
# copy file to server
scp -i /Users/leo/path/noc.pem /Users/leo/path/test.txt.gpg ec2-user@100.31.47.111:/home/ec2-user/
# copy file from server to local
scp -i /Users/leo/path/noc.pem ec2-user@100.31.47.111:/home/ec2-user/test.txt /Users/leo/path/
Decrypt gpg file
# verify have the private key
gpg --list-secret-keys
# decrypt. when prompt, provide private key phrase
gpg --decrypt --output mytest.csv mytest.csv.gpg
No comments:
Post a Comment