LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 04-19-2011, 11:39 PM   #1
hks1233
Member
 
Registered: Nov 2010
Posts: 30

Rep: Reputation: 1
Different SSH


Hi All

Is it possible to switch to different ssh in LINUX

Regards
Hks1233
 
Old 04-19-2011, 11:49 PM   #2
varunb
Member
 
Registered: Mar 2011
Location: Bangalore, INDIA
Distribution: opensuse, fedora
Posts: 135
Blog Entries: 1

Rep: Reputation: 1
Quote:
Originally Posted by hks1233 View Post
Hi All

Is it possible to switch to different ssh in LINUX

Regards
Hks1233

hi

what do you mean by switch ssh???
are you trying to say to login/switch to different PC through ssh??

anyways command to login to other PC through your PC is
# ssh -x <username>@<IP address>
 
Old 04-20-2011, 12:19 AM   #3
hks1233
Member
 
Registered: Nov 2010
Posts: 30

Original Poster
Rep: Reputation: 1
Hi Varunb

am looking for switching on different ssh session on same Linux box not to a different one.


Regards
Hks1233
 
Old 04-20-2011, 12:42 AM   #4
brownie_cookie
Member
 
Registered: Mar 2011
Location: Belgium
Distribution: CentOS release 5.5 (Final), Red Hat Enterprise Linux ES release 4 (Nahant Update 8)
Posts: 416
Blog Entries: 2

Rep: Reputation: 12
if i understand your problem right, you can do the following

Code:
ssh user@host 'commando1; commando2; commandon'            (this is session one)
ssh user@host 'commando1; commando2; commandon'            (this is session two on the same host)
you can replace the commando1, ... with commands like: ls, grep, if-then-else, find, .......

But if you don't mean this, then (i geuss) you need to clearify your problem a little bit more...
 
Old 04-20-2011, 01:26 AM   #5
hks1233
Member
 
Registered: Nov 2010
Posts: 30

Original Poster
Rep: Reputation: 1
Hi All

consider the situation of having a Linux box . And made connection to the box from a machine using session shh1 and connected to the same Linux box using session ssh2....

Is there any way to switch from session ssh1 to ssh2


Thanks
hks1233
 
Old 04-20-2011, 01:47 AM   #6
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,

You could use screen or tmux but would need to set it up from the initial shell (ie "ssh1") in order to attach to that shell from the second ssh (ie "ssh2").

For random tutorials see for example:
- For screen: http://news.softpedia.com/news/GNU-S...al-44274.shtml
- For tmux: http://blog.hawkhost.com/2010/06/28/...l-multiplexer/

(these are just two of the links that came up when I searched duckduckgo.com for "screen tutorial" and "tmux tutorial")

There also used to be a program called "retty" that would allow you to steal control of terminal programs... I think it was a little buggy though and may not be available for most distros.

Cheers,

Evo2.

PS. Your use of "ssh1" and "ssh2" terminology may have been a little confusing to some, since "ssh1" and "ssh2" usually refer to the two different protocol versions of ssh.
 
1 members found this post helpful.
  


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
The difference in settings: console from desktop & ssh as DISPLAY not set when ssh in wikapuki Linux - Newbie 10 07-02-2010 09:44 AM
ssh-agent, ssh-add and ssh-keygen AND CVS raylpc Linux - General 2 11-19-2008 02:50 AM
setting up an ssh soxy or local ssh tunnel from within an ssh soxy Mangenius Linux - Networking 0 03-05-2007 03:15 PM
Passwordless SSH with SSH commercial server and open ssh cereal83 Linux - General 7 04-18-2006 12:34 PM


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