[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ssh



Christopher Browne wrote:
On Tue, Jan 20, 2009 at 11:06 AM, David A. Parker <dparker@utica.edu> wrote:
Is any 'send file' command to make so that two machines (an amd64
multisocket and a simple i386, both lenny) talk scp with one another
through a router (attached to adsl) fully without asking the password?

With 'fully' I mean that command:

ssh target_machine_name date

gives the date without asking a password. The mere sending id_rsa.pub
to create the authorized_keys file only works (without asking the
password) for command:

ssh target_machine_name

but if 'date' is also requested, the password is needed (at least in my
hands).

I know how to solve the issue, i.e. by cross appending the
authorized_keys files, in order that each machine knows itself. But
there must be a simpler way.

That's odd.  I am able to get commands to work over SSH without a password.
 I copied the contents of ~/.ssh/id_rsa.pub on my work computer into
~/.ssh/authorized_keys on my home computer.  Now I can SSH from my work
computer to my home computer like this:

ssh me@myhomepc date

And it logs into my home computer and then runs the date command.  I did not
have to do anything with the authorized_keys file on my work computer to
make this happen.

That's all appropriate.

You only need to modify authorized_keys in both places if you want the
symmetric relationship that either machine can log into the other.


Correct.

I mentioned that I did not have to alter the authorized_keys file on my work PC in response to the OP's statement:

>>> I know how to solve the issue, i.e. by cross appending the
>>> authorized_keys files, in order that each machine knows itself. But
>>> there must be a simpler way.

I have no idea why you would need to do something like that. I have never had to "cross-append" anything in order to make this work. I just wanted to clarify for the OP that the keys only need to be shared in one direction to do this.

He seems to indicate that the passwordless login works just fine unless he tries to run a command through the ssh command line. I don't know why that would make a difference.

He also mentioned scp, and I think the better alternative would be to run sftp with a batch file.

    - Dave

--

Dave Parker
Utica College
Integrated Information Technology Services
(315) 792-3229
Registered Linux User #408177


Reply to: