LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 04-26-2005, 09:42 PM   #16
ERBRMN
Member
 
Registered: Mar 2005
Location: Japan
Distribution: TurboLinux, RHEL, SUSE
Posts: 96

Rep: Reputation: 15

Quote:
Originally posted by manojg
Hi Blinker_Fluid,

I tried. When I used the command "ssh-keygen -t dsa -f ~/.ssh/mykey" it asked to enter a passphrase. I entered a password.
After doing all these steps that you have suggested, I tried to ssh. The it again asked to enter "passphrase". So, it is not realy a passwordless connection. LAM/MPI requies connection without any external input.

Is there any thing missing?

Thanks.
Manoj
Did you add new public key file (with passphrase) to authorized key file of remote SSH server?

Like:
cat user_id.pub >> authorized_keys

There is:
user_id.pub - Your public key file with is create on your computer with "passphrase"
authorized_keys - Remote SSH server authorized key file
 
Old 04-27-2005, 08:07 AM   #17
manojg
Member
 
Registered: May 2004
Posts: 78

Rep: Reputation: 15
Hi Blinker_Fluid,

Sorry, I figured out this.
 
Old 04-27-2005, 08:24 AM   #18
johnnydangerous
Member
 
Registered: Jan 2005
Location: Sofia, Bulgaria
Distribution: Fedora Core 4 Rawhide
Posts: 431

Rep: Reputation: 30
Quote:
Originally posted by manojg
Hi Blinker_Fluid,

I tried. When I used the command "ssh-keygen -t dsa -f ~/.ssh/mykey" it asked to enter a passphrase. I entered a password.
After doing all these steps that you have suggested, I tried to ssh. The it again asked to enter "passphrase". So, it is not realy a passwordless connection. LAM/MPI requies connection without any external input.

Is there any thing missing?

Thanks.
Manoj
dont enter password when generating just do a "enter" hit when asked !
 
Old 05-25-2005, 05:40 AM   #19
Y0jiMb0
Member
 
Registered: Jul 2003
Location: Valencia (Spain)
Distribution: slackware 11, FEDORA CORE 4, RHEL3, Gentoo...
Posts: 361

Rep: Reputation: 30
Quote:
#!/usr/bin/expect --

set timeout 180
set machine [lindex $argv 0]
set username [lindex $argv1]
set password [lindex $argv 2]
spawn ssh $username@$machine
expect "$username@$machine's password: "
send "$password\n"
interact
Thanks for posting this solution; however I found a bug:
if password begins with "-" it doesn't work. It interprets the password as an option. What can be done?

Another question, how secure is this?

Regards

Last edited by Y0jiMb0; 05-25-2005 at 05:42 AM.
 
Old 05-25-2005, 06:08 AM   #20
johnnydangerous
Member
 
Registered: Jan 2005
Location: Sofia, Bulgaria
Distribution: Fedora Core 4 Rawhide
Posts: 431

Rep: Reputation: 30
Quote:
Originally posted by Y0jiMb0
Thanks for posting this solution; however I found a bug:
if password begins with "-" it doesn't work. It interprets the password as an option. What can be done?

Another question, how secure is this?

Regards
what is this script for?
 
Old 05-25-2005, 12:13 PM   #21
Y0jiMb0
Member
 
Registered: Jul 2003
Location: Valencia (Spain)
Distribution: slackware 11, FEDORA CORE 4, RHEL3, Gentoo...
Posts: 361

Rep: Reputation: 30
Quote:
what is this script for?
It was posted by vineet.k; it automates the process of ssh-ing. If you call it "sshlogin" (and give it proper permissions) it runs like this:

Code:
sshlogin node1 abc xyz
and what it does is: log into machine "node1", with username "abc" and password "xyz".
You can execute inside another script and you don't have to be prompted for the password every time. I know it is risky and ugly if you want, but I cannot manage to get working the public key stuff (as I don't have root access to the listener machine I don't know if I will be able to solve that question; I believe it is related to some conf file)

I hope to have clarified your question...
Anyway, mine still remains: how (un)secure is this thing?

Regards
 
Old 05-25-2005, 01:06 PM   #22
vineet.k
LQ Newbie
 
Registered: Apr 2005
Distribution: RedHat
Posts: 17

Rep: Reputation: 1
SSHlogin

If your password starts with - then try using " " [quotes].
I have not tried this. Hope this should work.
Or sometimes it may take " " as a part of your password.

Every coin has two sides.

Got any other solution for this issue ?

One more problem is there. Since you are spawning a program with another, the child process will be limited to use the total memory allocated for the parent process.
Try sshlogin to a machine and then try listing ( ls -l ) a directory with not less that 100 files. At times the ls will go into an infinite loop, you can get out of it. (Even with Cntrl + C). Since it is a seperate process.


Take care.
 
Old 05-25-2005, 03:23 PM   #23
Y0jiMb0
Member
 
Registered: Jul 2003
Location: Valencia (Spain)
Distribution: slackware 11, FEDORA CORE 4, RHEL3, Gentoo...
Posts: 361

Rep: Reputation: 30
Quote:
If your password starts with - then try using " " [quotes].
I have not tried this. Hope this should work.
Or sometimes it may take " " as a part of your password.
Indeed I tried it and yes, it considers " just another character of the password.
If must be something simple, but I can't find the good side of the coin...

Any "expect" expert around here?

Regards
 
Old 06-21-2005, 08:26 PM   #24
kevingpo
Member
 
Registered: Nov 2004
Location: Edinburgh, UK
Distribution: Fedora Core 3
Posts: 188

Rep: Reputation: 30
Quote:
Originally posted by Blinker_Fluid
hosts.equiv is rsh it is not ssh. <snip>
You mention about rsh, and hosts.equiv file. But in the previous postings there hasn't been any reference or query about this matter.

However, how do you use the hosts.equiv file to get passwordless rsh?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't get passwordless ssh working thorney Linux - Networking 3 11-27-2005 10:08 PM
Passwordless SSH problem? LQYY Linux - Software 5 06-09-2005 09:56 PM
Passwordless SSH access to LTSP Terminals MurrayL Linux - Networking 0 06-06-2005 05:10 AM
Passwordless SSH for Cluster nedian123 Linux - Networking 3 12-07-2004 10:15 PM
Regarding Passwordless SSH nedian123 Linux - Software 1 08-05-2004 05:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 01:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration