Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 10-23-2003, 03:57 PM   #1
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, 05:26 PM   #2
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

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

Old 10-24-2003, 03:21 AM   #3
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, 03:30 AM   #4
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


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

ssh - OpenSSH SSH client (remote login program)

And read it.
Old 10-24-2003, 03:59 AM   #5
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" you can alyaws use alias:
$ alias jump="ssh myname@mydomain"
then type:
$ jump
Old 10-25-2003, 07:55 AM   #6
Registered: Aug 2003
Location: Hyderabad, India
Posts: 126

Rep: Reputation: 15
More info is available at O'Reilly's hack'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/"...hit enter - best to use defaults
$ scp .ssh/ urlogin@anotherserver:.ssh/authorized_keys2

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


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 07:53 PM
Automatic login? Cooljerk Linux - Newbie 3 09-14-2005 05:52 PM
Automatic login Mad Echidna Linux - Software 1 12-17-2002 07:00 PM
Automatic Login SlavaVB Linux - General 2 03-12-2002 12:10 AM
Automatic Login kilobravo Linux - General 1 02-15-2002 02:01 AM > Forums > Non-*NIX Forums > Programming

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

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