Copying a file from Windows to Linux through SSH

github logo ・1 min read

If you are working on Windows and need to transfer a file from window to Ubuntu server follow these simple steps

First, Install and configure SSH on your Ubuntu server

Execute the following commands :
$ sudo apt update
$ sudo apt install openssh-server

Enable port 22 for SSH in firewall
$ sudo ufw allow 22

Check status whether SSH is running in a linux machine
$ sudo systemctl status ssh

You can start or stop SSH using the following commands
$ sudo systemctl status ssh
$ sudo systemctl status ssh

Copy file from Windows to Ubuntu server
Execute this command

scp Filepathinwindows username@ubuntuserverip:linuxserverpath

scp D:/TxtFile.txt root@ipaddress:/home/usr/

On transferring, cmd prompt will ask for password enter your ubuntu password corresponding to user

twitter logo DISCUSS
Classic DEV Post from Jan 30

Make art, not apps <3

You don't have to build an app. In fact, if you don't need to, then don't.

Bharat Dwarkani profile image
5+ years of professional full-stack development experience in architecting, designing & development of web and desktop applications in various domains. now has dark theme. 🌝

Go to the "misc" section of your settings and select night theme

(You can also change font to sans serif, which a lot of folks prefer.) 💖