SSH is a life-saver when you need to remotely manage a computer, but did you know you can also upload and download files, too? Using SSH keys, you can skip having to enter passwords and use this for scripts! This process works on Linux and Mac OS, provided that they’re properly configured for SSH access. If you’re using Windows, you can use Cygwin to get Linux-like functionality, and with a little tweaking, SSH will run as well.
Copying Files Over SSHSecure copy is a really useful command, and it’s really easy to use. The basic format of the command is as follows: scp [options] original_file destination_fileThe biggest kicker is how to format the remote part. When you address a remote file, you need to do it in the following manner: user@server:path/to/fileThe server can be a URL or an IP address. This is followed by a colon, then the path to the file or folder in question. Let’s look at an example. scp –P 40050 Desktop/url.txt yatri@192.168.1.50:~/Desktop/url.txt This command features the [-P] flag (note that it’s a capital P). This allows me to specify a port number instead of the default 22. This is necessary for me because of the way I’ve configured my system.Read more: How-to geek
QR:
0 comments:
Post a Comment