Solved

Copy files to Virtual Private Server (VPS)

Posted on 2009-04-09
8
732 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
 
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Guide: Build a Hyper-V Cluster Introduction We all know that Hyper-V is a cost effective solution (see http://www.experts-exchange.com/A_7831.html), and now we want to take advantage of it, right?  Unfortunately, hardware fails, leading to dow…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

757 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now