By Hashamkha Pathan on Jul 29, 2008
Folks who work with Zones may find this useful. Let's say you have created Zones on Solaris workstation. If you are in global zone, you end up accessing these zones using "zlogin" command. It's a special interface that let's you "login" to zone from the Global zone without supplying the root password. Of course you need to be "root" in Global zone to use this command. This access method is sufficient in most of the cases except when you need GUI. For example, if you are installing third party application that requires GUI access. There are various ways to initiate a GUI session(VNC Server, Use of Reflection etc) to the Zone or System.
The below given steps are quick way to get GUI access to the Zone - especially if you working on your workstation. I find this convenient. The same steps apply for any Solaris system and not restricted to Zones alone.Note, that we are using "ssh" capability of display forwarding.
First Step is to enable "ssh" access for "root" user on the Zone. Default configuration of "ssh" doesn't allow, "root" user to login to the system. You enable the access by editing the "ssh" configuration file "/etc/ssh/sshd_config" and modify the entry that control "root" access. Then restart the "ssh" service.
root@zone1:[/] # vi /etc/ssh/sshd_config - "Change PermitRootLogin no" to "PermitRootLogin yes"
root@zone1:[/] # svcadm restart ssh
Now from the Global zone, you can login to Zone using "ssh" with "-X" option. Note that you need your /etc/hosts file up to date with IP address to host mapping. Otherwise you may use the IP address of the Zone.
bash-3.00# ssh -X zone1
The authenticity of host 'zone1 (10.12.161.101)' can't be established.
RSA key fingerprint is d2:cf:ec:f3:89:7e:da:74:1f:27:b2:25:88:0e:f5:44.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'zone1,10.12.161.101' (RSA) to the list of known hosts.
Last login: Mon Jul 28 09:08:29 2008 from 10.12.161.35
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
Test the ability to launch the GUI application.
You are good to go!