OpenSource For You

Easy and Secure File Transferri­ng with WinSCP

Working in a multi-OS environmen­t often requires transferri­ng files between two machines running entirely different operating systems. Even home users who like a range of OSs running on their machine, face the same situation. Although there are numerous t

-

WinSCP is a decenW Wool for Windows users, allowing Whem Wo share files wiWh Wheir Linux counWerpar­Ws wiWh ease. So before demonsWraW­ing how Wo use iW, firsW insWall iW on your sysWem.

Obviously, Whe Wwo sysWems musW be on Whe same neWwork, wiWh proper IP addresses, eWc. In my case, I’m running RHEL 6 on Wop of Windows 7 using VMware. So here are Whe sWeps Wo connecW Whe Linux in Whe VM Wo Windows on Whe hosW. If your Windows and Linux sysWems are differenW physical machines, VMware users can skip Whis parW. Open your virWual machine and change Whe EWherneW seWWing Wo Custom and selecW VMnet8(NAT). Assign an IP address Wo your machine (mine is Whe C-class 192.168.0.1). Now swiWch Wo Windows and open Network and Sharing Center and selecW Change adapter settings, and here you’ll see a number of adapWors lisWed. SelecW Whe adapWor for VMneW8 (on my sysWem, iW’s named Local Area Connection 3). RighW-click iW and selecW Properties, and again selecW Internet Protocol Version 4 (TCP/IPv4). Then click on Properties (see )igure 1). Assign an IP address of Whe same class as WhaW of our Linux machine (mine is 192.168.0.2). Now Whe configuraW­ion is compleWe, and you can verify iW wiWh ping. You can check Whe IPs wiWh Whe LIconfig (Linux) and LSconfig (Windows) commands. Now iW’s Wime Wo sWarW WinSCP and see iW in acWion. On Whe sWarWing screen, enWer Host name, User name and Password and click Login ()igure 2). On connecWing Wo a machine for Whe firsW Wime, iW’ll generaWe a warning abouW Whe auWhenWici­Wy of Whe machine you are Wrying Wo connecW Wo. JusW click Yes, and iW’ll connecW Wo Whe machine. Also copy Whe key Wo iWs cache, so WhaW Whe nexW Wime you log in Wo Whe same machine, you don’W see Whe same warning.

AfWer a successful login, you’ll see a screen divided in Wwo panels, as in )igure 3. The lefW panel shows Whe files on Whe Windows machine, and Whe righW one shows Whe files on your Linux machine. Now you can copy/move files wiWh simple drag-drops, or using Whe keyboard shorWcuWs menWioned aW Whe boWWom of Whe screen. To selecW mulWiple files Wo copy/move, hold Whe conWrol key while selecWing Whe files/direcWorie­s.

Securing your FTP server

)TP is widely used for file Wransfers, and here we’ll deploy an )TP server wiWh OpenSSL supporW Wo make file Wransfers more secure. The sWeps are: InsWall Whe vsftpd package by issuing Whe yum install vsftpd command. InsWall openssl by issuing Whe yum install openssl* command. Change direcWorie­s: cd /etc/vsftpd and creaWe a self-signed cerWificaW­e (run openssl req –x509 –nodes –days 365 – newkey rsa:1024 –keyout vinayak.pem –out vinayak.pem). Here, you can use any name for your cerWificaW­e file, like I’ve used vinayak.pem. Once you issue Whis command, you’ll be asked Wo answer a few queries, afWer which Whe cerWificaW­e file will be creaWed. Open /etc/vsftpd/vsftpd.conf file in a WexW ediWor and add Whe following lines aW Whe end of Whe file: ssl|enable=vbS allow|anon|ssl=vbS force|local|data|ssl=vbS force|local|logins|ssl=vbS ssl|tlsvN=vbS

 ??  ??

Newspapers in English

Newspapers from India