You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by RobG <sl...@gmail.com> on 2008/08/19 22:02:52 UTC

Using scp -- how to find or make a keyfile?

I have a small ANT task that's purpose is to find changed files in a 
given directory, and then sftp them to a destination server.

I'm using scp for this, but it won't work because it wants a Keyfile. 
I'm wondering how I go about either making it not care about a keyfile, 
or generating one?

Thanks!

Rob


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Using scp -- how to find or make a keyfile?

Posted by Robert Anderson <ri...@gmail.com>.
Can you post your ant build file (remove any passwords that may be in it),
and the error message?

If you want to use ssh keys for authentication, you need to do the
following:
1. Generate a key pair...
ssh-keygen -d
2. Copy the public key to the remote server.
scp ~/.ssh/id_dsa.pub user@host:
3. Add the public key to the authorized_keys file on the remote host for the
user you will connect as....
ssh user@host 'cat id_dsa.pub >>.ssh/authorized_keys'
4. Test the connection. You should not be prompted for a password...
ssh user@host

If you are prompted with a password, check the permission of the .ssh
directory and it content both locally and on the remote host. Directories
should be 700 and files 600. Public keys can be 644.

I highly recommend reading the man pages for ssh, particularly the
authentication section.

-Rob A

On Tue, Aug 19, 2008 at 1:47 PM, Barry Pape <bp...@netspend.com> wrote:

> Can you use ssh keys?
> Here's a nice walkthrough:
> http://www.sshkeychain.org/mirrors/SSH-with-Keys-HOWTO/SSH-with-Keys-HOW
> TO-4.html<http://www.sshkeychain.org/mirrors/SSH-with-Keys-HOWTO/SSH-with-Keys-HOWTO-4.html>
>
> -----Original Message-----
> From: RobG [mailto:sledder@gmail.com]
> Sent: Tuesday, August 19, 2008 3:03 PM
> To: Ant Users List
> Subject: Using scp -- how to find or make a keyfile?
>
>
> I have a small ANT task that's purpose is to find changed files in a
> given directory, and then sftp them to a destination server.
>
> I'm using scp for this, but it won't work because it wants a Keyfile.
> I'm wondering how I go about either making it not care about a keyfile,
> or generating one?
>
> Thanks!
>
> Rob
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
> -----------------------------------------
> Confidentiality Notice!
> This electronic transmission and any attached documents or other
> writings are confidential and are for the sole use of the intended
> recipient(s) identified above. This message may contain information
> that is privileged, confidential or otherwise protected from
> disclosure under applicable law. If the receiver of this
> information is not the intended recipient, or the employee, or
> agent responsible for delivering the information to the intended
> recipient, you are hereby notified that any use, reading,
> dissemination, distribution, copying or storage of this information
> is strictly prohibited. If you have received this information in
> error, please notify the sender by return email and delete the
> electronic transmission, including all attachments from your
> system.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>


-- 
Rob Anderson
riznob@gmail.com

RE: Using scp -- how to find or make a keyfile?

Posted by Barry Pape <bp...@netspend.com>.
Can you use ssh keys?
Here's a nice walkthrough:
http://www.sshkeychain.org/mirrors/SSH-with-Keys-HOWTO/SSH-with-Keys-HOW
TO-4.html

-----Original Message-----
From: RobG [mailto:sledder@gmail.com] 
Sent: Tuesday, August 19, 2008 3:03 PM
To: Ant Users List
Subject: Using scp -- how to find or make a keyfile?


I have a small ANT task that's purpose is to find changed files in a 
given directory, and then sftp them to a destination server.

I'm using scp for this, but it won't work because it wants a Keyfile. 
I'm wondering how I go about either making it not care about a keyfile, 
or generating one?

Thanks!

Rob


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


-----------------------------------------
Confidentiality Notice!
This electronic transmission and any attached documents or other
writings are confidential and are for the sole use of the intended
recipient(s) identified above. This message may contain information
that is privileged, confidential or otherwise protected from
disclosure under applicable law. If the receiver of this
information is not the intended recipient, or the employee, or
agent responsible for delivering the information to the intended
recipient, you are hereby notified that any use, reading,
dissemination, distribution, copying or storage of this information
is strictly prohibited. If you have received this information in
error, please notify the sender by return email and delete the
electronic transmission, including all attachments from your
system.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org