Fazza Posted March 12, 2018 Posted March 12, 2018 I have a Windows PC with a share called LinuxDump on it and I have a CSV file in it that I want to copy over to my CentOS 7 Hyper-V server. I need to copy the CSV file on to my Linux server so I can import it in to my database but I've spent an hour this morning following instructions from dozens of websites and I'm not getting anywhere! Clearly I'm doing something wrong as such a simple thing shouldn't be taking this amount of time so I need some help please?!
FN-GM Posted March 12, 2018 Posted March 12, 2018 Enable SSH on your server if it hasn't been done already and then use WinSCP to transfer the file. If you can already get a putty connection to the server SSH is already enabled. To enable SSH To install the server and client type: # yum -y install openssh-server openssh-clients Start the service: # chkconfig sshd on # service sshd start Make sure port 22 is opened: # netstat -tulpn | grep :22
ChrisH Posted March 12, 2018 Posted March 12, 2018 Can you not just use SSH and SCP or something with an easy client like Bitvise Tunnelier?
Fazza Posted March 12, 2018 Author Posted March 12, 2018 The websites I've been following use SAMBA or SMB and I've just twigged the reason it's not working is it must be trying to use SMB V1 by default and we all know that's not gonna work if you're on the latest version of Windows 10 due to the Spectre Metltdown vulnerabilities! I'll give the SSH a go in a minute or I'll have to see if anyone knows how to force CentOS to use SMB V2 instead of V1.
Davit2005 Posted March 12, 2018 Posted March 12, 2018 Another vote for WinSCP, used it many times even to transfer files to ESXi hosts occasionally, i.e. drivers/firmware.
Fazza Posted March 12, 2018 Author Posted March 12, 2018 Can you not just use SSH and SCP or something with an easy client like Bitvise Tunnelier? Probably but I've only been using Linux for a few weeks know so what you've just said is literally a foreign language!! Another vote for WinSCP, used it many times even to transfer files to ESXi hosts occasionally, i.e. drivers/firmware. I'm copying and pasting the above commands at the moment and just downloaded the software so we'll see how I get on shortly! Thanks all for the replies - greatly appreciated as I'm learning loads about Linux right now on a very sharp learning curve
Fazza Posted March 12, 2018 Author Posted March 12, 2018 Enable SSH on your server if it hasn't been done already and then use WinSCP to transfer the file. If you can already get a putty connection to the server SSH is already enabled. To enable SSH To install the server and client type: # yum -y install openssh-server openssh-clients Start the service: # chkconfig sshd on # service sshd start Make sure port 22 is opened: # netstat -tulpn | grep :22 Thank you so much for that! Everything is easy when you know how, and now I know this, file transfers to and from Linux are now easy!
FN-GM Posted March 12, 2018 Posted March 12, 2018 Thank you so much for that! Everything is easy when you know how, and now I know this, file transfers to and from Linux are now easy! Glad my post helps and I couldn't agree with you more! 1
Fazza Posted March 12, 2018 Author Posted March 12, 2018 Why don't you just email it What command do you use to access email?
mjk Posted March 12, 2018 Posted March 12, 2018 What command do you use to access email? mail. so to send a file you would use mail -s subject [email protected] < yourfilename.txt
mjk Posted March 12, 2018 Posted March 12, 2018 mail. so to send a file you would use mail -s subject [email protected] < yourfilename.txt Sorry that would be how you would send email. Anyway it's a bit off-topic if you don't need to setup a mail server. Stick to ssh - and setup keys so you don't need ot login every time.
DGardiner Posted March 12, 2018 Posted March 12, 2018 ssh into the centos with filezilla on the windows machine and drag/drop the file would be my go to
dhicks Posted March 13, 2018 Posted March 13, 2018 I have a Windows PC with a share called LinuxDump on it and I have a CSV file in it that I want to copy over to my CentOS 7 Hyper-V server. As a one-off operation or on a schedule? Once you've got SSH access to your server you could just copy-and-paste the text from the CSV file open in Windows directly to a text editor open on the terminal.
Fazza Posted March 13, 2018 Author Posted March 13, 2018 SSH and WinSCP are working fine for me Thank you everyone for helping me on my sharp Linux Learning Curve!
k-strider Posted July 6, 2018 Posted July 6, 2018 If your familiar with scp in Linux then I drop PSCP.exe from the putty website into my windows directory cause it works the same as scp does in Linux term... but in cmd
Arthur Posted July 6, 2018 Posted July 6, 2018 If your familiar with scp in Linux then I drop PSCP.exe from the putty website into my windows directory cause it works the same as scp does in Linux term... but in cmd OpenSSH is included with Windows 10 now (since v1709). No need for PuTTY or even WSL. 3
mjk Posted July 6, 2018 Posted July 6, 2018 OpenSSH is included with Windows 10 now (since v1709). No need for PuTTY or even WSL. It's laughable how ssh has been on mac,linux and other unixes for the last 20 years. I always thought it was down to the licensing which meant microsoft couldn't put it into windows given how useful ssh is ! I guess they are focusing on developers a bit more now, but does anyone have any ideas why they neglected this for so long ?
FN-GM Posted July 6, 2018 Posted July 6, 2018 OpenSSH is included with Windows 10 now (since v1709). No need for PuTTY or even WSL. Never knew that!
Arthur Posted July 6, 2018 Posted July 6, 2018 I guess they are focusing on developers a bit more now, but does anyone have any ideas why they neglected this for so long? It may have something to do with the previous CEO... www.theregister.co.uk/2001/06/02/ballmer_linux_is_a_cancer www.zdnet.com/article/ballmer-i-may-have-called-linux-a-cancer-but-now-i-love-it/ It's laughable how ssh has been on mac, linux and other unixes for the last 20 years. Better late than never!
k-strider Posted July 11, 2018 Posted July 11, 2018 Wow i didn’t know that but I run server on my workstation but when 2019 is out happy days
Arthur Posted July 11, 2018 Posted July 11, 2018 (edited) Never knew that! I guess they are focusing on developers a bit more now Wow I didn’t know that but I run server on my workstation but when 2019 is out happy days I think the eventual aim is to replace WinRM with SSH for PowerShell Remoting to enable you to run commands remotely regardless of whether you are using Windows, macOS or Linux. Since build 17063, Microsoft have also added Curl and Tar to make it easier for developers to work with containers (although that's not all you can use them for). Edited July 11, 2018 by Arthur
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now