Solution to copy files from Linux client to Linux Server
Check if
sshdis running on your server using:ps aux | grep sshdIf not install
OpenSSHusingsudo apt-get install openssh-server openssh-clienthttps://www.tecmint.com/install-openssh-server-in-linux/Restart your server and verify that
sshdis running usingps aux | grep sshdIf you need you can configure your
/etc/ssh/sshd_configfile, but its not necessary for simple configurationsverify that the ports are open using
netcatnc -v -z 127.0.0.1 22To copy files from a
Linuxclient to aLinuxclient use scp as followsscp ~/filename.md [email protected]:~/folder/filename.mdTo verify that file has been copied use
ssh [email protected]and provide your password.
Solution to copy files from Linux client to `Windows
There are multiple clients for running SSH servers on Windows such as:
Install one of the above servers and make sure that port 22 is open using
netsh advfirewall firewall add rule name="SSH Port 22" dir=in action=allow protocol=UDP localport=22 netsh advfirewall firewall add rule name="SSH Port 22" dir=out action=allow protocol=UDP localport=22netsh advfirewall firewall add rule name="SSH Port 22" dir=in action=allow protocol=TCP localport=22 netsh advfirewall firewall add rule name="SSH Port 22" dir=out action=allow protocol=TCP localport=22netsh advfirewall set allprofiles state offComparisons of these servers:
Bitvise SSH server
Provides almost close to native
cmdprompt,powershellprompt, autocompletionProvides additional capabilities for customization, if you need advanced usage
User customization for simple needs is 0. I got started on it within 2 mins, after having spent a lot of time trying to get
MobaSSHandOpenSSHto work.To copy files using scp use:
scp ~/filename.md [email protected]:/C/Users/username/filename.mdFree for personal use, $99 for professional use. Because of so many features and great integration, the price is well worth the money
MobaSSH:
provides a linux shell on windows where simple linux commands such as
ls,cp,findetc work, similar toMINGW64you can access
cmdandpowershelldirectly by typingcmdorpowershellUnicode support is poor. Encoding is not correct. For example if you try to start
Pythoninterpretor, it will crash. You will need to change the encoding manually using (https://stackoverflow.com/a/12834315/4752883):chcp 65001set PYTHONIOENCONDING=utf-8and then startup Python promptThe great thing about MobaSSH is that it has a very simple user-interface, and
scpandsshand integrated well. So will work for simple use casesTo copy files from a
Linuxclient to aWindowsserver runningMobaSSH: usescp ~/filename.md [email protected]:/cygdrive/c/Users/username/filename.mdThis is becauseMobaSSHis based oncygwinand its drives are mapped to the same waycygwin-s drives are mapped.
Use VMs from Microsoft with OpenSSHv6.7 installed from https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/, OpenSSHv6.7 is already installed.
Its very buggy, and you will need to heavily customize it.
Command completion doesnt work
It will leave blank spaces when you are moving cursor on the terminal
Python doesn't work
Later versions of OpenSSH, may have improved on it. Further MS seems to make OpenSSH available via
Optional Featureshttps://developer.microsoft.com/en-us/microsoft-edge/tools/vms/