LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-16-2007, 01:54 PM   #1
yawe_frek
Member
 
Registered: Sep 2005
Distribution: feather 0.72-usb, DSL,CentOS,Ubuntu, Redhat 9
Posts: 144

Rep: Reputation: 15
Cool Remotelogin Scripts


hi guys,

i am writing scritps that will enable me login to a remote server and scp specific files and folder. but i seem to be having a little problem with how to encrypt the password.
e.g

#!/bin/bash

ssh <host>
password:xiedirirr

now my problem, how can i encrypts this passwd.

I need help?
 
Old 12-16-2007, 02:28 PM   #2
SiegeX
Member
 
Registered: Jul 2004
Location: Silicon Valley, CA
Distribution: Slackware
Posts: 171

Rep: Reputation: 38
Don't use password authentication if you want to do remote ssh'ing within a a script. Instead you RSA key authentication that requires no password at all. Check out this link

http://www.enterprisenetworkingplane...le.php/3469681
 
Old 12-17-2007, 02:21 AM   #3
yawe_frek
Member
 
Registered: Sep 2005
Distribution: feather 0.72-usb, DSL,CentOS,Ubuntu, Redhat 9
Posts: 144

Original Poster
Rep: Reputation: 15
thanks for the reply, it really made things muh easier, bt could you knindly give me an example of how that part of the script would look like.

will it be something like this

#!/bin/bash

ssh <host>
password: rsa or dsa key

kindly confirm.am i rigth or...

Thanks
 
Old 12-17-2007, 04:52 AM   #4
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Quote:
ssh <host>
password: rsa or dsa key

kindly confirm.am i rigth or...
No.
When you have set up key-authentication you just ssh hostname and bang! You are connected.
The key authentication handshake is handled automatically by ssh
 
Old 12-17-2007, 05:47 PM   #5
SiegeX
Member
 
Registered: Jul 2004
Location: Silicon Valley, CA
Distribution: Slackware
Posts: 171

Rep: Reputation: 38
I just looked at the link I gave you, it isn't very clear. This link is much better

http://www.cs.umd.edu/~arun/misc/ssh.html
 
Old 12-17-2007, 07:29 PM   #6
yawe_frek
Member
 
Registered: Sep 2005
Distribution: feather 0.72-usb, DSL,CentOS,Ubuntu, Redhat 9
Posts: 144

Original Poster
Rep: Reputation: 15
Cool

nice one this tutorial is really cool, but since i wont be using any passwd, is there any use of ssh-agent program to manage passwd. i am ok without a pw or what do u think.

Thnaks.
 
  


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
VPN: Debian Scripts -> Mandriva 2006 Scripts Undefined Mandriva 0 11-30-2005 12:10 PM
scripts rooney18 Linux - Security 4 11-02-2004 08:12 AM
Need help running scripts from scripts sdouble Linux - Newbie 3 05-31-2004 12:56 PM
Scripts? zombie killa Linux - Software 5 05-29-2003 05:19 PM
rc scripts mr_mandrill Slackware 7 09-05-2002 05:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:30 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
Open Source Consulting | Domain Registration