Solution to copy files from Linux client to Linux Server
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 but it's not necessary for simple configurationsverify that the ports are open using
netcat:nc -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
Solution to copy files from Linux client to Windows
There are multiple clients for running SSH servers on Windows such, 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 minsminsute, 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 linuxLinux shell on windowsWindows where simple linuxLinux commands such as
ls,cp,find, etc., 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
LinuxLinux client to aWindowsWindows server runningMobaSSH: usescp ~/filename.md [email protected]:/cygdrive/c/Users/username/filename.mdThis is becauseMobaSSHis based oncygwinCygwin and 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.
ItsIt's very buggy, and you will need to heavily customize it.
Command completion doesntdoesn't 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 Features"Optional Features" https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/