LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 04-12-2010, 08:10 AM   #1
siris
LQ Newbie
 
Registered: Apr 2010
Posts: 7

Rep: Reputation: 0
automatic login by using ssh but with out creating public key


Hi,

I want to connect to anothere server from my current server through SSH command.

when I am using the command in the terminal like-- ssh username@ip
it is asking me to give password. This is working fine in the terminal. but I want to do it automatic through a shell script.

How can I be able to provide userid and password through shell script??

I was trying to achieve it by creating a public key and copy it to the destination .ssh file. but I dont have the permission to create any file in the destination server.

please any help in this regard...
 
Old 04-12-2010, 08:30 AM   #2
troop
Member
 
Registered: Feb 2010
Distribution: gentoo, arch, fedora, freebsd
Posts: 379

Rep: Reputation: 97
Tou should edit ~/.ssh/authorized_keys
~/.ssh - is directory.
You can use expect:
http://www.linuxquestions.org/questi...ssword-533684/
 
Old 04-12-2010, 08:40 AM   #3
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 250Reputation: 250Reputation: 250
How can you not have permission to create any files ?
When you log in with ssh as a user you go to that users home directory.
 
  


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
open-ssh vs. commercial ssh (tru64), public-key auth not possible? cf050 Linux - Networking 8 03-28-2012 12:15 PM
SSH public key authentication Jeroen1000 Linux - Security 12 09-07-2009 05:14 AM
SSH: Automated Login via public key not working kregec05 Linux - Server 11 08-19-2009 03:49 AM
Public Key Authentication with SSH edafe Ubuntu 1 08-26-2006 12:06 PM
ssh using public key jkmartha Linux - Networking 1 05-04-2005 03:52 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:50 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration