LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 09-08-2009, 08:16 AM   #1
ojha_riddhish
LQ Newbie
 
Registered: Mar 2009
Location: Vapi, India
Distribution: RHEL 5, openSUSE 11.1, Ubuntu 8.10 / 9.04, Fedora 10
Posts: 19

Rep: Reputation: 0
Question Push my SSH to another pc


Dear friends,
Sorry, for a noob question. But, I trust the capabilities of SSH server and I know that SSH supports forwarding my SSH to remote machine. I don't know how. What I want to do is:

My machine's IP is 192.168.1.36 with OpenSSH server and client installed. I have another machine with IP 192.168.1.33 which is usually installed for games with OpenSSH server and client installed. Both machines have Ubuntu Jaunty. My firewall is disabled. I can ssh to .36 machine from .33 and vice-versa. I want to know how can I send my machine's(.33) SSH to .36.

I mean, if I enter a command in .33 machine for SSH, it should send my SSH session to .36 machine and ask for authentication there. After entering valid credentials, the .36 machine should have my SSH session from .33 machine.

So, I can control my .33 machine and rectify errors if they occur. I hope, am understood perfectly. If anyone have done this, please reply with your configuration. I need to do it. Please help!

Thanks in advance!

Last edited by ojha_riddhish; 09-08-2009 at 08:26 AM.
 
Old 09-08-2009, 09:17 AM   #2
Matz
Member
 
Registered: Oct 2006
Distribution: Kubuntu 9.04, Debian Etch
Posts: 178

Rep: Reputation: 31
Can't figure out your problem: what do you want to send from .33 to .36?

Can you provide an example?
 
Old 09-08-2009, 09:33 AM   #3
vishesh
Member
 
Registered: Feb 2008
Distribution: Fedora,RHEL,Ubuntu
Posts: 658

Rep: Reputation: 66
Dear ojha

You can set up sshd on both machine using private/public key authentication to avoid password prompt everytime to connect another linux machine. For steps to configure sshd on both machine , please link given in my signature.


Thanks
 
Old 09-08-2009, 11:41 PM   #4
ojha_riddhish
LQ Newbie
 
Registered: Mar 2009
Location: Vapi, India
Distribution: RHEL 5, openSUSE 11.1, Ubuntu 8.10 / 9.04, Fedora 10
Posts: 19

Original Poster
Rep: Reputation: 0
Smile

Dear Matz & Vishesh,
Thanks for taking the time out and reading my post. Thanks!

I have two machines, one I use for my development(.36) in php, bash, etc. The other, I've setup as a game server(.33) which my nephew and niece play on. Both machines have jaunty running perfectly with openssh server and clients. I've even set public/private keys so I can login to any machine without needing the password. The kids doesn't know of it.
There are times when the games they play stop responding, or anything of the sort, a problematic situation. In those times, they run to my room asking for help. I have to manually ssh to that machine with X forwarded or use vnc to view and rectify the error.
Now, what I want is to write a script containing a single command of ssh. When this command is executed it provides the ssh session of the game server(.33) on my machine(.36). Then, my kids dont have to run in my room and call for help. They can just double click the script and sit back until I try to solve their issue. This thing will make the kids lazy, but its a good thing for me to learn more about ssh and ubuntu. I just need myself to be reminded of the situation on the game server.

Thanks in advance!
 
Old 09-09-2009, 02:08 AM   #5
JulianTosh
Member
 
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Blog Entries: 3

Rep: Reputation: 90
Quote:
Originally Posted by ojha_riddhish View Post
I can ssh to .36 machine from .33 and vice-versa.
This sounds like you're already doing what you're asking. You can ssh to and from each machine. So I (we) are confused...

Quote:
Originally Posted by ojha_riddhish View Post
I mean, if I enter a command in .33 machine for SSH, it should send my SSH session to .36 machine and ask for authentication there. After entering valid credentials, the .36 machine should have my SSH session from .33 machine.
I picture this as sending the command as a parameter to the ssh command... such as:

Code:
ssh user@example.com "service sshd restart"
which would connect to the remote machine, ask for credentials and run the service command.

If you are asking about running GUI commands remotely, then do the same thing but use the -Y argument to forward X11. For instance,

Code:
ssh -Y user@example.com "system-config-network-gui" &
would launch the remote system's network gui app on your local display.

Did I even come close to what you're asking?
 
Old 09-09-2009, 02:10 AM   #6
JulianTosh
Member
 
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Blog Entries: 3

Rep: Reputation: 90
wow, i let that unfinished post set a little too long. nevermind.
 
Old 09-09-2009, 08:50 PM   #7
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,261

Rep: Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028
Sounds like you want to set up a cmd on the games system that uses ssh public key auth to login to your desktop and use the 'wall' cmd to let you know they have a problem
http://linux.die.net/man/1/wall
Personally I think the exercise is good for them
 
Old 09-11-2009, 07:21 AM   #8
ojha_riddhish
LQ Newbie
 
Registered: Mar 2009
Location: Vapi, India
Distribution: RHEL 5, openSUSE 11.1, Ubuntu 8.10 / 9.04, Fedora 10
Posts: 19

Original Poster
Rep: Reputation: 0
Smile

Dear Friends,
I am sorry that I am unable to explain it to you what I want and in return I am confusing you. I apologize for that.
I just wanted to see an SSH session on my pc from the remote machine as a popup whenever my kids execute the script. Consider as if they are allowing me to do anything on their pc.

Thanks in advance!
 
Old 09-11-2009, 07:41 AM   #9
JulianTosh
Member
 
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Blog Entries: 3

Rep: Reputation: 90
Ah. Try playing around with this... On your kid's computer, type this in:

Code:
ssh dad@dadsComputer "DISPLAY=:0.0 /usr/bin/zenity --info --text 'help me, dad!'"
replace dadsComputer with the name/IP of your computer. You should get a popup that says "help me, dad!"

From there, you can play with sudo and ssh keys and a batch file so all they have to do is click a link and you'll get notified.
 
  


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
Non programmer looking for push... sir-lancealot Programming 3 09-22-2008 06:50 PM
Obex Push thoyyib Linux - Software 2 05-10-2006 08:12 AM
Just need a 'push' with sed MarcQuadra Programming 2 09-02-2004 11:59 PM
Push installation balpeck Linux - Networking 1 09-21-2003 09:30 AM
Left_ctrl-push-button??>? matt3333 Slackware 7 12-15-2002 09:45 PM


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

Main Menu
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