Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8720415
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:02:09+00:00 2026-06-13T07:02:09+00:00

I would like to ask you for some help. How can I use an

  • 0

I would like to ask you for some help. How can I use an scp task when my username contains an @ sign?

I tried to escape the character in many ways but it isn’t working. In the following example, my username is user@host.com

<scp file="test.txt" todir="&quot;user@host.com&quot;:password@ftp.host.com:/" trust="true" sftp="true"/>
<scp file="test.txt" todir="'user@host.com':password@ftp.host.com:/" trust="true" sftp="true"/>
<scp file="test.txt" todir="user\@host.com:password@ftp.host.com:/" trust="true" sftp="true"/>

But the output is always the same:

neither password nor keyfile for user "user has been given.  Can't authenticate. 

Please, is there anyway to force the task to parse this string correctly? Thank you very much.

By the way, I don’t know why but with my current provider it is impossible to create a username without appending the hostname.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T07:02:11+00:00Added an answer on June 13, 2026 at 7:02 am

    I use the SCP task in my build.xml and it’s form looks like this:

    <scp file="package/ROOT.war" todir="user@example.com:~" trust="true" password="${password}"/>
    

    Looking at the source of the SCP Task at the function parseUri(String uri) (line 370) it appears that the task can support a username with a @ symbol. The restrictions appear to be with paths that have a : or @ in them as seen by this comment:

    // user:password@host:/path notation
    // everything upto the last @ before the last : is considered
    // password. (so if the path contains an @ and a : it will not work)
    

    The code doesn’t seem to support this comment (as pointed out by
    martin clayton). You can also see the error you are referring which is triggered when the password or the keyfile is missing. Maybe the combination of a password in user:password@host:/path notation and a username with an @ is causing problems?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Good morning! I would like to ask some help from you guys on how
I'm still fairly new to mysql and would like to ask for some help.
i would like to ask some help from you guys. i am making a
I would like to ask some help. This is not homework but it is
I would like to ask how HAProxy can help in routing requests depending on
I would just like to ask some help in constructing a regex formula for
I'm having a hard time with templates and would like to ask some help.
I would like to ask you about some advices about this code. It works,
I would like to make my application ask the user some informations via something
I would like to ask, how can I define class inside another one. In

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.