The command from a Linux terminal on your PC to connect to your server is: ssh or ssh In my case the hostname of the Debian server VM is debianvm. Here follows a quick refresher that explains how you can log into your server via SSH. While explaining the steps for copying files to the Debian server via SSH, I’ll occasionally SSH into the Debian server to verify that the files actually got transferred. Refer to this article in case you would like to setup a similar Debian server as a virtual machine with VirtualBox. I configured the same username on both the PC and the server. The Linux server VM also runs Debian 10 and its hostname is set to debianvm. I run Debian 10 on this PC and its hostname is set to tinka. My trusty Lenovo Thinkpad T450s serves as the Desktop PC. Below you can find an illustration of the system setup: Instead of setting up a cloud server somewhere for this article (think Digital Ocean or Linode for example), I decided on running a Linux server as a virtual machine (VM) on my laptop. System setupĪ typical system setup consists of your Linux desktop PC, connected to your local network router, and a remote Linux server somewhere in the cloud. Namely, by using the scp and rsync programs. This article presents you with two of these methods. Luckily though, several methods exist that enable you to copy files via SSH. Unfortunately, you cannot directly transfer a file from your own PC to your remote Linux server through this active SSH terminal session. So you SSH-ed into your server and you are staring at your terminal screen, wondering how to go about this task. While administering you Linux server, sooner or later you run into a situation where you have a file on your own Linux PC and you need to transfer this file to your Linux server. Through SSH you can install, configure and update software on your Linux server, to name just a few common Linux server administration tasks. SSH enables you to securely log in and access your Linux server over an unsecured network. Once you have your own Linux server up and running, you typically access it through SSH. One based on the scp program and one based on the rsync program. It presents two methods for achieving this file transfer in a secure way. On Windows, use backslash, at least at conventional command console.Do you have a file on your Linux PC that needs to be transferred to your Linux server and you are not sure how to do this? This article teaches you how to copy files via SSH to your remote Linux server. Or going the other way around: scp C:\myRepo\ProjectFooBar\somefile.cpp also found that if spaces are in the path, the quotations should begin following the remote host name: scp Long Folder Name\somefile.cpp" C:\myRepo\SimplerNamerBroĪlso, for your particular case, I echo what Cornel says: Transferring securely from a remote system to your local system: scp C:\myRepo\ProjectFooBar I found the required syntax to beīY EXAMPLE INSTEAD OF MORE OBSCURE AND INCOMPLETE TEMPLATES: Though surprisingly simple, it took a while. On Windows 10 Pro connecting to Windows 10 Pro, both running OpenSSH (Windows version 7.7p1, LibreSSL 2.6.5), I was able to find a solution by trial and error. This simple, natural question does not seem to be documented anywhere. I, therefore, hope I can contribute and help someone as they too find themselves stumbling for an answer. I see this post is very old, but in my search for an answer to this very question, I was unable to unearth a solution from the vast internet super highway.
0 Comments
Leave a Reply. |