Help answer threads with 0 replies.
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 05-11-2008, 01:30 AM   #1
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, 03:38 AM   #2
LQ Newbie
Registered: May 2008
Posts: 12

Original Poster
Rep: Reputation: 0

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.


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

All times are GMT -5. The time now is 01:05 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