INTRODUCTION
Instances arise with in an organization that require remote collaboration. With the use of SSH (Secure SHell) and a neat little program called screen, loss of productivity can be minimized.
SCENARIO
Bob and Joe work in the same building. However, Bob is on the 48th floor logged into 'computer-a' and Joe is on the 42nd floor logged into 'computer-c'. Bob phones Joe with a software problem that requires immediate attention. Instead of Joe walking 5 miles to get to the 48th floor to do some magic, Joe shells into Bob's computer and uses screen to show Bob how fix the problem.
Once logged into computer-a via ssh, initiate a screen session by typing:
screen -S name-of-session
The program, screen is a virtual terminal manager. The -S option means the particular title of the session. It could be any name that is desired. In place of the name-of-session, give it some generic name.
Going back to the scenario, Joe instructs Bob to type:
screen -x name-of-session
The -x option means to attach to an existing screen session.
This will create a joined terminal session. This means that whatever is typed, both parties can see what is going on. In the scenario, Joe can actually show Bob how to fix the software problem without being physically at Bob's computer.
To detach the session to only return to at a later time, press the Ctrl+A+D keys at the same time. To return to the same session, retype the command in the terminal, screen -x name-of-session.
SOLUTION
NOTE: In order for this to work, both parties must be logged in as the same user.
Joe uses SSH to tunnel into Bob's computer:
ssh computer-a
Joe uses SSH to tunnel into Bob's computer:
ssh computer-a
NOTE: In order to ssh or shell into a computer using a host name rather than ip address on the same network or subnet, the /etc/hosts file must be configured. To do this, in terminal as root, type either vi /etc/hosts or gedit /etc/hosts. At the bottom of the file it reads:
127.0.0.2 computer-c.site computer-c
On the next line, enter the ip address of computer-a and the host name. For example:
192.168.1.12 computer-a.site computer-a
Once logged into computer-a via ssh, initiate a screen session by typing:
screen -S name-of-session
The program, screen is a virtual terminal manager. The -S option means the particular title of the session. It could be any name that is desired. In place of the name-of-session, give it some generic name.
Going back to the scenario, Joe instructs Bob to type:
screen -x name-of-session
The -x option means to attach to an existing screen session.
This will create a joined terminal session. This means that whatever is typed, both parties can see what is going on. In the scenario, Joe can actually show Bob how to fix the software problem without being physically at Bob's computer.
To detach the session to only return to at a later time, press the Ctrl+A+D keys at the same time. To return to the same session, retype the command in the terminal, screen -x name-of-session.
OTHER NON-WORK RELATED USES
If Joe wanted to talk with Ginger over at HR with out leaving his desk, Joe would initiate the same type of session with Ginger. Instead of seeing 'bash: hello: command not found' error every time a non-command is entered, just type:
cat > chat
This way, Joe and Ginger can yap it up, during their lunch break. Just remember to hit Ctrl + C when finished.
cat > chat
This way, Joe and Ginger can yap it up, during their lunch break. Just remember to hit Ctrl + C when finished.
CONCLUSION
In this document, ssh has been used along with screen to initiate collaboration with another user on the network.
THANKS
This particular SSH tip came from Vallard Benincosa at IBM.
We welcome any and all helpful ideas, questions, comments and suggestions.
--GeS
We welcome any and all helpful ideas, questions, comments and suggestions.
--GeS
0 comments:
Post a Comment