Solved

SFTP connection without password prompt?

Posted on 2006-11-15
4
5,986 Views
Last Modified: 2011-08-18
I am trying to connect our server to another via SFTP to send files securely, and I would like to automate this connection.  Whenever I connect to the remote server with the username assigned to us by the remote administrators, it always asks for a password to log in, which the user must enter manually.  Is there a way to set up the connection so we do not have to put in a password all the time?  I have read some of the documentation on ssh and sftp, and tried generating a public key based on a private key we already use for one trading partner, then placing this public key in a .ssh directory on the remote server as a 'authorized_keys' file, but it still asks for the password, even if I use a -o 'IdentityFile _filename_' in the sftp command.  any help would be appreciated..
0
Comment
Question by:ewessel
  • 2
  • 2
4 Comments
 
LVL 24

Expert Comment

by:slyong
Comment Utility
You can setup ssh without password: http://www.astro.caltech.edu/~mbonati/WIRC/manual/DATARED/setting_up_no-password_ssh.html, if you google "ssh no password" you should get a lot of examples.

If you have tried generating the ssh-key, the main thing is that when you use ssh-keygen, it will ask for a passphrase, just press enter without typing any passphrase so that it won't ask for a passphrase when you use sftp.
0
 

Author Comment

by:ewessel
Comment Utility
I didn't put a passphrase in when generating the key, so that's not the issue.  I'm not sure what version of ssh the server is using, I know our side should be using OpenSSH, being a RHEL3 server..  Should I find that out first?  I originally just generated a RSA key..
0
 

Author Comment

by:ewessel
Comment Utility
Ok, If found out that it will allow a passwordless sftp connection if I am logged in as root and use the 'IdentityFile _filename_' option, but if I am looged in as a user and use the same thing it asks for a password.  Any other ideas?
0
 
LVL 24

Accepted Solution

by:
slyong earned 300 total points
Comment Utility
Did you generate the ssh key using root account?  You have to generate the key using the account that you intend to login.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

​Being a Managed Services Provider (MSP) has presented you  with challenges in the past— and by meeting those challenges you’ve reaped the rewards of success.  In 2014, challenges and rewards remain; but as the Internet and business environment evol…
BIND is the most widely used Name Server. A Name Server is the one that translates a site name to it's IP address. There is a new bug in BIND (https://kb.isc.org/article/AA-01272), affecting all versions of BIND 9 from BIND 9.1.0 (inclusive) thro…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now