LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 05-11-2008, 02:30 AM   #1
Tamaros
LQ Newbie
 
Registered: May 2008
Posts: 12

Rep: Reputation: 0
Question ssh session within a bash script


I was attempting to create a bash script which would set up the ad hoc network i needed to tether my laptop to my iPhone.

I then tried to expand it by SSHing in to my iPhone and starting the SOCKS and BIND daemons then all I have to do is set up the SOCKS proxy on the laptop and I'm done. However, I discovered that once the SSH connection is establish it just waits for manual input then when I exit out the commands I intended to be run in the SSH session are executed on my laptop.

I was wondering if anyone could help me out with making this work the way I was envisioning.
 
Old 05-11-2008, 04:38 AM   #2
Tamaros
LQ Newbie
 
Registered: May 2008
Posts: 12

Original Poster
Rep: Reputation: 0
Solved

Moral of the story is to be more persistant in research before asking for help. Figured out to include the desired commands in quotes as part of the ssh command.
 
  


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
[SOLVED] pass password in bash script to SSH vikas027 Programming 4 01-20-2012 04:09 PM
Run intractive ssh session in a bash script MasterC Programming 2 10-15-2007 06:08 PM
Bash script to test if I can SSH to a server? DanHulton Linux - General 2 05-18-2007 02:42 PM
how to have bash script check whether it's a x session? bkeeper Linux - Newbie 9 02-21-2006 07:31 AM
bash script suggestions for waiting for ssh -L iggymac Programming 4 03-22-2005 08:04 PM


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