Solved

Copy files to Virtual Private Server (VPS)

Posted on 2009-04-09
8
743 Views
Last Modified: 2013-12-24
Hi everyone,

I'm new to managing a VPS so please be patient with me :-)

Im running coldfusion and I'm simply looking to copy my local custom tag files from the folder C:\ColdFusion8\CustomTags to the same destination on my VPS.

So what is the easiest way and more secure way to copy the files.

Thank yo.
0
Comment
Question by:ymorin
  • 3
  • 3
  • 2
8 Comments
 
LVL 27

Expert Comment

by:azadisaryev
ID: 24112781
FTP.
set up an FTP server on your VPS and upload your files. FileZilla Server is a great free ftp server. my VPS came with it pre-installed, but it is super easy to set up yourself.

Azadi
0
 
LVL 36

Expert Comment

by:SidFishes
ID: 24113087
easy and more secure don't often go together... :)

ftp is pretty insecure...but easy

I chose to use ssh which is -easy- on a linux box but a little involved on a win box which is what i use

steps

Login to remote server using RemoteDesktop with DriveConnected option

steps...download and install cygwin (http://www.cygwin.com/)

(note: the following is adapted from several pages of instructions on the net)

once cygwin installed,

generate the public/private key pair. This is done by

Start Menu >All Programs > Cygwin > Cygwin Bash Shell

then entering the following command ($ indicates the Bash prompt and not something to be typed):

$ ssh-keygen -t dsa

You will first be prompted for a location to save the public/private key pair. Just press enter for the default location of ~/.ssh/id_dsa.

You will then be prompted for a passphrase. DO NOT ENTER ANYTHING HERE, JUST PRESS ENTER TWICE. This is very important otherwise you will still be prompted for a password. The output you should see on your screen is something like:

Generating public/private dsa key pair.
Enter file in which to save the key (/home/YourHomeDirectory/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/YourHomeDirectory/.ssh/id_dsa.
Your public key has been saved in /home/YourHomeDirectory/.ssh/id_dsa.pub.
The key fingerprint is: ..... some weird hexadecimal numbers which don't matter .....

YourHomeDirectory is usually the name of the user you are logged on as

Then open My Computer (still on remote server) and browse to C:\cygwin\home\YourHomeDirectory\.ssh\

Copy the file id_dsa from C:\cygwin\home\YourHomeDirectory\.ssh to drive mapped to local computer (ie: C on localmachine). This is the drive on your local computer that you shared when you set the DriveConnected option when starting RemoteDesktop. File should now appear in the root of the local computer's C: drive

Close all windows on remote server, log off RemoteDesktop

Important: DriveConnected will remain enabled for each subsequent RemoteDesktop session until you uncheck the drive and log in. Since it is a security risk to have mapped drives over the internet, we need to disable the mapped drive immediately. Follow the steps in DriveConnected in reverse to disable the mapped drive C:, login and then log out.

The key then needs to be converted by a program called puttygen http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

install it then open it

Select Conversions > Import Key > Save as ppk file

important: Save without a passphrase to ensure that auto login can take place. or use passphrase which will require you to enter it each time you login

on the local machine dl and install winscp http://winscp.net/eng/index.php

open winscp

Click Load

    * Host Name is  IP address of remote server
    * Port Number is 22 (ssh default)
    * User Name is YourHomeDirectory (the default set up by cygwin)
    * Password is blank (using private key)
    * Enter path to Private Key
    * Click Save
    * Click Login

you now have a secure connection to your vps....

My co-loc goes a step further and only allows port 22 connections from authorized ip's before that I saw a lot of hack attempts on 22 (not near as many as on 21 ftp tho)

nice thing about this is you can automate tasks like ul or dl of files from the vps securely and unattended (if you don't use the passphrase with putty gen)

0
 

Author Comment

by:ymorin
ID: 24113131
I've setup both the client and the server on the VPS and created a group and a user.

use port 5600 and im when trying to connect from client (not from the VPS) i always timeout.
0
Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

 
LVL 27

Expert Comment

by:azadisaryev
ID: 24113401
> use port 5600 and im when trying to connect from client (not from the VPS) i always timeout.

port 5600 is not a standard port. make sure your VPS firewall is not blocking this port.

Azadi
0
 

Author Comment

by:ymorin
ID: 24117722
How do I open port on a VPS?
0
 

Author Comment

by:ymorin
ID: 24118214
Under Plesk I created a firewall rule to open a specific port but its show as isnt responding when trying to access it.
0
 
LVL 36

Accepted Solution

by:
SidFishes earned 500 total points
ID: 24152342
if you don't want to go the whole ssh route (I recommend it but...)

You can probably use your RDP connection to move your files

before you connect via RDP, go into Options>Local Resources> More>Drives>drive of your custom tag folder

then click ok and connect... when you do this you will get a warning about trusting the connection..click connect anyways. Your local drive will now be shared with your remote computer so you can copy files from your dev machine (local) as if connected on a lan (just slower)

remember to logout and remove this conecction, and log back in to prevent reconnection
0
 
LVL 36

Expert Comment

by:SidFishes
ID: 24152350
"so you can copy files from your dev machine (local) as if connected on a lan (just slower)"

when logged on to remote machine via RDP ... the drive will show up in the remote systems drives in explorer
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
how to generate a csr to request an intermediate ca on os x 3 49
CFFILE upload help 98 169
spamming  on Hosted svrs? 6 98
pros and cons of RDS vs VDI 12 348
Every once-in-a-while, when you try to add a XenServer host to the System Center Virtual Machine Manager console, it will generate a certificate error, and the XenServer host will not be added to Virtual Machine Manager: If you are experiencing t…
Nowadays, Virtual Machines are used equally by small and large scale organizations. However the issue is that VMDK files are also prone to corruption. So, in this article we are looking at how to recover VMDK files from hard disk of host operating s…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question