Solved

Copy files to Virtual Private Server (VPS)

Posted on 2009-04-09
8
756 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Turn your laptop into a mobile console!

The CV211 Laptop USB Console Adapter provides a direct Laptop-to-Computer connection for fast and easy remote desktop access with no software to install.

 
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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Introduction RemoteFX is already in use today, but you're probably not aware of it.  With the advent of Windows 2012 and Windows 8, RDP has gotten a whole lot better due to the fact that RDP now uses even more RemoteFX technologies to make desktop …
What You Need to Know when Searching for a Webhost Provider
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Suggested Courses

635 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