# Using keys for scp

## audiodef

I have key login set up for ssh on my VPS. Can I do this for scp? If so, how?

----------

## cach0rr0

'lo ! been away for a bit, globetrotting and working. 

if you've done it for ssh, it's already done for scp

```

scp -i ~/.ssh/id_dsa filename.doc user@domain.com:/home/user/

```

----------

## audiodef

How'd you like the globetrotting?   :Smile: 

You're right. I've gotten used to ssh'ing in as root (yes, you may scold me for this). What I can do from now on is ssh and scp as a regular user, ssh in as a regular user, su, and move files. That way, I don't need to create a key for root and never have to send a password to my VPS to be sniffed out by script kiddies.

----------

