keep an open connection with scp or another similar program


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users keep an open connection with scp or another similar program
# 1  
Old 08-10-2011
keep an open connection with scp or another similar program

Does anyone know a way to keep the connection open with scp? I really don't like having to type my password in every time I want to transfer a file. Or is there another similar program that will keep my connection open?
# 2  
Old 08-10-2011
You can setup SSH shared keys between the 2 hosts you want to scp.
With shared keys, it won't ask you for a password. Search on google on how to setup password less SSH authentication between 2 hosts.
# 3  
Old 08-10-2011
# 4  
Old 08-11-2011
Quote:
Originally Posted by COKEDUDE
Does anyone know a way to keep the connection open with scp? I really don't like having to type my password in every time I want to transfer a file. Or is there another similar program that will keep my connection open?
Try sftp. It gives you an interactive prompt. It's not a shell, so things like fancy ls options won't work.

Code:
sftp username@host
password:  ####
> put local.file path/to/remote/file
> put other.file path/to/other.file
> get path/to/remote/file
> mget path/to/many/files*
> exit

There's also ways to setup auto-login for ssh/scp/sftp (all the same protocol technically), keys, so scp won't have to ask for a password.
# 5  
Old 08-12-2011
Quote:
Originally Posted by Corona688
Try sftp. It gives you an interactive prompt. It's not a shell, so things like fancy ls options won't work.

Code:
sftp username@host
password:  ####
> put local.file path/to/remote/file
> put other.file path/to/other.file
> get path/to/remote/file
> mget path/to/many/files*
> exit

There's also ways to setup auto-login for ssh/scp/sftp (all the same protocol technically), keys, so scp won't have to ask for a password.
Thx Smilie. Does mget not exist in the fedora version of sftp? I have the most updated version of sftp and I can't find mget in my man pages.
# 6  
Old 08-12-2011
Just try it, it works. The GNU people just want to punish people for using 'man' pages instead of their newfangled 'info' ones.
# 7  
Old 08-12-2011
Shh keys are better and they can be used to remotely login to your servers as well. I can give step by step instructions if you need it.

Also you can use the GUI to connect. On the top panel go to places --> connect to Server

I hope this helps
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Validating scp connection

Hi Team, I have 2 servers Server-A & Server-B. Is there any way to test scp connection between Server-A & Server-B without transferring file? Basically i want to test the availability of scp connection.. Thanks in advance... (6 Replies)
Discussion started by: Girish19
6 Replies

2. UNIX for Advanced & Expert Users

How keep running a program n an another computer via a connection ssh when the connection is closed?

Hi everybody, I am running a program on a supercomputer via my personal computer through a ssh connection. My program take more than a day to run, so when I left work with my PC I stop the connection with the supercomputer and the program stop. I am wondering if someone know how I can manage... (2 Replies)
Discussion started by: TomTomGre
2 Replies

3. HP-UX

HP-UX loaner program similar to IBM's VLP?

I was wondering if HP offers a loaner program to allow me virtual access to a HP-UX host, similar to IBM's loaner program for their AIX platform. The loaner program is essentially a VPN to IBM's network where you can access a number of AIX machines remotely. Thanks! (2 Replies)
Discussion started by: vokuro
2 Replies

4. Shell Programming and Scripting

RSH connection problem while running MPI program

I'm trying to run MPI programs on 8 machines, but I get the error connect to address 127.0.0.1 port 544: Connection refused Trying krb4 rsh... connect to address 127.0.0.1 port 544: Connection refused trying normal rsh (/usr/bin/rsh) lagrid02: Connection refused When I run it with a... (8 Replies)
Discussion started by: vishwamitra
8 Replies

5. UNIX for Dummies Questions & Answers

SCP Connection Timeout

Hello UNIX users, Thanks for helping me in my earlier post. Now, I am facing a timeout issue when ever I am transferring a zipped file from my server to client's server. If the zipped file size is below 3 MB, it goes fine. Anything above that fails. Below is the part of screenshot from... (1 Reply)
Discussion started by: st3636
1 Replies

6. UNIX for Dummies Questions & Answers

Script to open program and send/execute command in program

Hi, i want to write a script that executes a program (exec?) . this program then requires a filename as input. how do i give it this input in the script so the program will be complete run and close by the script. e.g. exec prog.exe program then asks for filename "enter filename:"... (1 Reply)
Discussion started by: tuathan
1 Replies

7. HP-UX

SCP transfer failed, lost connection

Hello, We try to do an SCP of a Sybase dump file of 4Go between two production HP-UX servers. Each time the transfer stopn at 299Mo and we have the message "connection lost". The destination FS has largefiles option activated. Could you help ? (7 Replies)
Discussion started by: ohemeg
7 Replies

8. Cybersecurity

Open Port 3306 for MySQL connection

I am needing to "un-block" port 3306 so that I can access MySQL from another PC. When I installed Mandrake 8.1, I set the security level to high because it is going to be a web server. I believe I have to allow access to my ports now and I do not know the commands to do that. If anyone... (4 Replies)
Discussion started by: gdboling
4 Replies

9. UNIX for Dummies Questions & Answers

Could not open SCM connection

I am currently getting the following error on a solaris box : Could not open SCM connectionlaris box: Would someone be able to help me understand the error as I do not know what a SCM connection is. thanks Kristian (1 Reply)
Discussion started by: kristian
1 Replies

10. UNIX for Dummies Questions & Answers

looking for a secure copy program (scp)

Hi could someone tell me where to find a secure copy prog. for unix and windows thnx a lot helios (4 Replies)
Discussion started by: helios
4 Replies
Login or Register to Ask a Question