LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-24-2003, 06:39 AM   #1
JeRrYmAn
LQ Newbie
 
Registered: Oct 2003
Posts: 21

Rep: Reputation: 15
Unhappy SSH and scripting


I need a little help with ssh-agent and a simple script:

code:
___________________________________________
eval 'ssh-agent $SHELL'
ssh-add
sftp -b batch user@server
eval 'ssh-agent $SHELL -k'
---------------------------------------------------------------------

It works but gives the output:

bash-2.05$ exit (i then enter 'exit')
exit
Need passphrase for /home/user/.ssh/identity
Enter passphrase for /home/user/.ssh/identity
Identity added: /home/user/.ssh/identity (/home/user/.ssh/identity)
bash-2.05$ exit(entered exit again)
exit


how do i script the batch so that i don't have to enter exit.
 
Old 11-24-2003, 03:02 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
Try putting "exit" in a line at the end of your code.
 
Old 11-25-2003, 03:34 AM   #3
JeRrYmAn
LQ Newbie
 
Registered: Oct 2003
Posts: 21

Original Poster
Rep: Reputation: 15
oK CEWL, where do i script to create a costom login message for the current user
 
Old 11-25-2003, 09:04 AM   #4
sopiaz57
Member
 
Registered: Apr 2003
Distribution: RH 8
Posts: 246

Rep: Reputation: 30
you can do that in two ways, 1 there is the /etc/motd file and 2 there is a directive in sshd_config called banner, where you point to a file containing a welcome banner or something.
 
Old 11-25-2003, 12:34 PM   #5
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
If it is different messages then you can edit /etc/basrc and get it to display an individual message per user too.
 
  


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
ssh-agent, ssh-add and ssh-keygen AND CVS raylpc Linux - General 2 11-19-2008 02:50 AM
Mac OS X ssh client / linux sshd : ssh hangs/disconnects Apollo77 Linux - Networking 1 05-24-2006 11:53 AM
scripting & ssh zovres Linux - General 2 10-01-2004 11:14 AM
Bash, SSH and scripting. Namuna Linux - Newbie 2 06-08-2004 02:01 PM
Bash scripting... ssh? TheIrish Programming 4 11-27-2003 08:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06: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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration