scp commad error
i can not move file from a sever to another one via SSH
source server : vbulletin.com
user : hala
pass : 123
source path : /home/hala/public_html/bakcup/db.sql
destination server :linuxforum.com
user : zode
pass : 321
destination path : /home/zode/dbs
how can i move it ?
This won't work if you want to include it as part of a script though....
scp /home/hala/public_html/bakcup/db.sql email@example.com:/home/zode/dbs/
Try : $ scp user@host:/file user2@host2:/file2
About the passwords, check $ man scp in order to see if there is a parameter to specify the password. I'm on FreeBSD right now and won't be able to check on a linux box until tomorrow :)
Hope this helps.
The password problem is easy enough to overcome with public keys.
Check out this link.
smolloy's solution is pretty interesting. In FreeBSD, you can use scp's -i option to specify your ssh key, there should be something similar to linux (man scp for more details).
is it requred to have SSH in both server to be able to run scp command ?
You need a properly configured ssh daemon running in the computer you want to connect to, and you need ssh to be installed in the computer you want to connect from (although I've never seen an installation where the latter hasn't been the case).