Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I know ssh is to create a secure shell connection to a machine, and we call ssh username@ip_address to login the machine.

Is there a way that I won't need to enter the password when connecting via SSH, or let's say SCP, or a run a command using SSH on a remote machine?

I know there are ssh-keys, which allow particular users to login without entering passwords.

Is there any other way to achieve so, which doesn't involve keys? Like some change in the ssh configuration?

share|improve this question
1  
Why are you opposed to using keys? That's the obvious solution, that's been in use and is tested and works. –  Rob Nov 8 '11 at 17:36
add comment

migrated from stackoverflow.com Nov 4 '11 at 19:45

This question came from our site for professional and enthusiast programmers.

6 Answers

Key-based authentication is the way to go. Not only is it easier than password auth when configured, but it is much more secure and is easily integrated into automated scripts. There is tons of literature out there on the subject -- to get you started:

https://hkn.eecs.berkeley.edu/~dhsu/ssh_public_key_howto.html

share|improve this answer
add comment

One less-common method is to authenticate via kerberos. If all your machines are in the same kerberos domain, then SSH can get your authentication information via GSSAPI from the kerberos subsystem.

The setup required is pretty complex though. This is certainly not something that you would choose because it is easier then key-based authentication.

On many systems SSH uses PAM for authentication. As such, there may be other methods you can used for authentication as well. Perhaps RSA tokens and so on.

share|improve this answer
add comment

Consider using "host-based authentication" (.rhosts)

share|improve this answer
    
Can yo elaborate on how that works please? –  slhck Nov 4 '11 at 23:30
add comment

The SSH protocol is meant to have an authentication of some sort. However, there are few things you can do to get around it.

  • Use a password like normal.
  • Set up an RSA SSH Key on the user machines that want to use your server.
  • Set up your server with a .rhosts or an hosts.equiv file so that it will expect requests from your user machines.
  • Use an auto-typer to enter your passwords for you. There are Bash, Batch, and GUI programs out there, and some system adminstrators roll that way.
share|improve this answer
add comment

Try site: Shortest passwordless ssh tutorial, ever

share|improve this answer
    
But that does use ssh keys. I already know that. –  Kumar Alok Nov 4 '11 at 18:04
add comment

sshpass automates entering in a password for ssh.

Sshpass is a tool for non-interactivly performing password authentication with SSH's so called "interactive keyboard password authentication". Most user should use SSH's more secure public key authentiaction instead.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.