LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 10-23-2003, 02:57 PM   #1
rsingh
Member
 
Registered: May 2003
Posts: 44

Rep: Reputation: 15
automatic login


i want to write a shell script which will automatically login into a server provinding it with my login name and password .so i dont have to do ssh abc@202.141.x.x everytime and wait for the username password coming up.can somebody help me?
 
Old 10-23-2003, 04:26 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,978
Blog Entries: 11

Rep: Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879
I'd suggest reading the ssh manuals and enabling
passwordless logins.

Cheers,
Tink
 
Old 10-24-2003, 02:21 AM   #3
rsingh
Member
 
Registered: May 2003
Posts: 44

Original Poster
Rep: Reputation: 15
what do you mean by passwordless logins?
do you think i should remove my pasword and leave my account open for all.
 
Old 10-24-2003, 02:30 AM   #4
wisey
LQ Newbie
 
Registered: Oct 2003
Location: Kent, England
Distribution: RH9 and Debian 3.0r1
Posts: 11

Rep: Reputation: 0
By using RSA identities, you can create a list of authorised keys, public and
private and login control is managed by the keys and not by usernames and
passwords.

try:

> man ssh
SSH(1) BSD General Commands Manual SSH(1)

NAME
ssh - OpenSSH SSH client (remote login program)

And read it.
 
Old 10-24-2003, 02:59 AM   #5
worldmagic
Member
 
Registered: Oct 2003
Location: Europe/Sweden
Distribution: RedHat
Posts: 78

Rep: Reputation: 15
Theres also a "shell" called "ssh-agent".. the agent asks you for your password to your keys, and after that it will never ask you for the password again.. well.. unless you teminate the "shell". You should also check out how to use keys to login. These can be with or without passwords. if you want a faster way then typing "ssh myname@mydomain.com" you can alyaws use alias:
$ alias jump="ssh myname@mydomain"
then type:
$ jump
 
Old 10-25-2003, 06:55 AM   #6
vanquisher
Member
 
Registered: Aug 2003
Location: Hyderabad, India
Posts: 126

Rep: Reputation: 15
More info is available at O'Reilly's hack series...it's under Linux administration hacks...try doing this...

$ ssh-keygen -t rsa
"enter private key - hit enter for....."
#You'll get some prompt asking "save rsa key to /home/ur name/.ssh/id_rsa.pub?"...hit enter - best to use defaults
$ scp .ssh/id_rsa.pub urlogin@anotherserver:.ssh/authorized_keys2

it should ask you for your passwd when u scp it...now you can login to 'urlogin@anotherserver' without any passwd and stuff...anyway, do check out the O'Reilly hacks...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Automatic Login? matthewa Linux - General 12 11-21-2005 06:53 PM
Automatic login? Cooljerk Linux - Newbie 3 09-14-2005 04:52 PM
Automatic login Mad Echidna Linux - Software 1 12-17-2002 06:00 PM
Automatic Login SlavaVB Linux - General 2 03-11-2002 11:10 PM
Automatic Login kilobravo Linux - General 1 02-15-2002 01:01 AM


All times are GMT -5. The time now is 12:48 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration