# Connecting servers?



## max21 (Mar 14, 2018)

I’m guessing that this is how it’s done but I don’t know the command-line or the port to use.

*1)  *What is the command that I can use to secure copy (scp) a directory full of files from VPS-1 directly to VPS-2 using tmux from home?

*2)  *How to permanently connect two VPS to each other so that I can use tmux from home to connect to VPS-1 and still be able to read-write-execute files on VPS-2?

I’m assuming that tinc vpn would be a way for question-2.  And for question-1, I figure that I can login VPS-1 from home then send a scp command while inside VPS-1 to VPS-2 to transfer the directory.  Are these the simplest and most common ways that many System Administrators would do it?


----------



## ShelLuser (Mar 14, 2018)

max21 said:


> What is the command that I can use to secure copy (scp) a directory full of files from VPS-1 directly to VPS-2 using tmux from home?


Check its manualpage. So run the `man scp` command and you can read scp(1). This will expain all the commandline options which are available to you.

If you're using Windows as your client then I've become very happy with PuTTY. Next to a fully usable SSH client (which also supports other options such as telnet) the project also provides commandline options for SCP (pscp.exe). That might also be usable to copy files from one VPS onto the other.

Keep in mind that this assumes that sshd is actually running. TMux has nothing to do with any of this.



max21 said:


> How to permanently connect two VPS to each other so that I can use tmux from home to connect to VPS-1 and still be able to read-write-execute files on VPS-2?


Depends. If both are in the same network you could consider looking into mounting remote filesystems using either NFS or perhaps even SMB (Samba). This would give you somewhat more direct access to the other VPS but not where you can also start programs. For that to work you'd need console access, and that's usually done by using ssh(1).

You're probably better off using SSH for this.


----------



## max21 (Mar 14, 2018)

ShelLuser said:


> ...
> You're probably better off using SSH for this.


Got it!

... and all the rest.


----------



## Phishfry (Mar 14, 2018)

There is a good GUI tool for FreeBSD desktops for task #1
sysutils/gigolo/
With this you can easily connect to both servers and copy. It uses GVfs and SSH
It is a good open source replacement for WinSCP.
http://www.winscp.net


----------



## max21 (Mar 16, 2018)

Phishfry said:


> There is a good GUI tool for FreeBSD desktops for task #1
> sysutils/gigolo/
> ....



Phishfry, what happen was sysutils/gigolo/ fail to install at the gvfs part.  I’m sure its because I’m using 11.1 stable and I managed to keep my old mate-desktop that came after Gnome-2 which provide browser-mode just like the old Win-XP and I will NEVER give that up until.  The most important thing to me was to hear from the top that these few things are possible without flaw.  So now I will learn tmux and set scripts to run scripts like ticking in a GNU box until this major technology occurs (or at least comes half-way back).  It’s better that I learn all I can at the command line just like you guys did back in the old days.  But thanks to tmux, I will.  About PuTTY, for what I see you cannot cut from notepad and paste into it into PuTTY.  That to me is ancient commandline work that keep me away since MSDOS-6.0 and Linux stuff.  However, I’m going to have to get use to it because at the public library all we get is XP in my city, and many surrounding states, or I will learn how to ssh into my home machine to connect just like you guys do on GP.  Anyway, I have confidents now.  It's time to clean-house for good!


----------



## SirDice (Mar 20, 2018)

max21 said:


> About PuTTY, for what I see you cannot cut from notepad and paste into it into PuTTY.


Sure you can. I'm copy/pasting a gazillion things on a daily basis with PuTTY. But you have to realize that CTRL-C and CTRL-V have a completely different meaning on a (UNIX) command line.


----------

