SCP files from local to server
Just a file
$ scp /path-file user@server:/path/
copy a directory
$ scp -r /path-dir user@server:/path/
SCP files from server to local
On the same local machine
$ scp user@server:/path-file-located /path-to-save-in-local
Command line to execute ssh with password authentication
$ ssh user@server
output:
user@server's password: []
Install sshpass and can try this
$ sshpass -p "server-password" user@server
Copy files, SCP files without prompting for password or
Command line to execute scp with password authentication
SCP files from local to server
$ sshpass -p "server-password" scp /path-file-to-copy user@server:/path-to-saveon'
Just a file
$ scp /path-file user@server:/path/
copy a directory
$ scp -r /path-dir user@server:/path/
SCP files from server to local
On the same local machine
$ scp user@server:/path-file-located /path-to-save-in-local
Command line to execute ssh with password authentication
$ ssh user@server
output:
user@server's password: []
Install sshpass and can try this
$ sshpass -p "server-password" user@server
Copy files, SCP files without prompting for password or
Command line to execute scp with password authentication
SCP files from local to server
$ sshpass -p "server-password" scp /path-file-to-copy user@server:/path-to-saveon'
No comments:
Post a Comment