SCP not auto completing copies

Questions about applications and software
Forum rules
Before you post please read this

SCP not auto completing copies

Postby Vusa on Mon Mar 23, 2009 4:27 am

Hi Guys,

I have a problem with Mint6(gnome).. When copying over files from my Mint6 laptop to another Linux server that I have logged into before, the scp statements changes and becomes incorrect when pressing the tab key. Please see example below.

Scenario. I want to copy a file called, file.txt to a remote dir called /attachments/ on server 10.0.0.1

scp file.txt 10.0.0.1:/attachments

On Mint5, I would get auto-completion when I press tab before completing the word "attachments", ie

Code: Select all
scp file.txt 10.0.0.1:/atta[tab]    "would become  correct ==>"     scp file.txt 10.0.0.1:/attachments     


This is because I would have logged into that server before with keys.

The problem on Mint6;

Code: Select all
scp file.txt 10.0.0.1:/atta[tab]    " would become ==>"   scp file.txt /attachments/
:|

I dont have an /attachments/ folder locally. So the Mint6 does check remotely, but doesnt keep the full statement.

Obviously when I press [enter], the command fails.

Any ideas?
Vusa
Level 1
Level 1
 
Posts: 13
Joined: Tue Aug 19, 2008 2:34 am

Linux Mint is funded by ads and donations.
 

Re: SCP not auto completing copies

Postby miket on Mon Mar 23, 2009 11:46 am

Hi,

The correct syntax for scp is as follows :

Code: Select all
scp ./file.txt username@10.0.0.1:/attachments/


The autocompletion wouldn't make a command completion for a folder on another host, it would only autocomplete if there was a directory with the same name in the current directory.

Mike.



Vusa wrote:Hi Guys,

I have a problem with Mint6(gnome).. When copying over files from my Mint6 laptop to another Linux server that I have logged into before, the scp statements changes and becomes incorrect when pressing the tab key. Please see example below.

Scenario. I want to copy a file called, file.txt to a remote dir called /attachments/ on server 10.0.0.1

scp file.txt 10.0.0.1:/attachments

On Mint5, I would get auto-completion when I press tab before completing the word "attachments", ie

Code: Select all
scp file.txt 10.0.0.1:/atta[tab]    "would become  correct ==>"     scp file.txt 10.0.0.1:/attachments     


This is because I would have logged into that server before with keys.

The problem on Mint6;

Code: Select all
scp file.txt 10.0.0.1:/atta[tab]    " would become ==>"   scp file.txt /attachments/
:|

I dont have an /attachments/ folder locally. So the Mint6 does check remotely, but doesnt keep the full statement.

Obviously when I press [enter], the command fails.

Any ideas?
User avatar
miket
Level 5
Level 5
 
Posts: 524
Joined: Tue Mar 04, 2008 5:50 am
Location: UK & France

Re: SCP not auto completing copies

Postby Vusa on Tue Mar 24, 2009 4:56 am

Hi Mike,

Your solution does NOT work..

On Mint5, I didnt have a problem with this.

On Mint6 I do.

Any ideas?
Vusa
Level 1
Level 1
 
Posts: 13
Joined: Tue Aug 19, 2008 2:34 am

Re: SCP not auto completing copies

Postby miket on Wed Mar 25, 2009 1:19 pm

Hi,

I think the only reason the autocomplete was working was becuase it was already in your history file, the bash shell will not login to another machine
in any way to make autocomplete work.

Type the command out in full yourself once, then the next time you try it use the tab to see if the autocomplete works.

Mike.

Vusa wrote:Hi Mike,

Your solution does NOT work..

On Mint5, I didnt have a problem with this.

On Mint6 I do.

Any ideas?
User avatar
miket
Level 5
Level 5
 
Posts: 524
Joined: Tue Mar 04, 2008 5:50 am
Location: UK & France

Re: SCP not auto completing copies

Postby Vusa on Fri Apr 03, 2009 2:05 am

Already tried that, It still doesnt work Mike..
Vusa
Level 1
Level 1
 
Posts: 13
Joined: Tue Aug 19, 2008 2:34 am

Re: SCP not auto completing copies

Postby emorrp1 on Fri Apr 03, 2009 6:58 am

Hi, not an actual solution to your problem, but a workaround: The latest version of mintUpload (2.1.2) in the community repository has scp support. You'd need to create a new file in ~/.linuxmint/mintUpload/services/ with the following contents:

Code: Select all
type=scp
name=My SCP
host=10.0.0.1
user=<YOUR USERNAME>
pass=<YOUR PASSWORD>
path=attachments


Then, you should be able to just right-click the file in your file manager, click Upload, select "My SCP" from the combo box, and click upload. Alternatively you could run
Code: Select all
/usr/lib/linuxmint/mintUpload/mintupload.py file.txt
from the command line.
If you have a question that has been answered and solved, then please edit your original post and put a [SOLVED] at the end of your subject header
Hint - use a google search including the search term site:forums.linuxmint.com
emorrp1
Level 8
Level 8
 
Posts: 2322
Joined: Thu Feb 26, 2009 8:58 pm


Return to Software & Applications

Who is online

Users browsing this forum: FraNe91, philliegp and 18 guests