VectorLinux

The nuts and bolts => Technical General => Topic started by: hata_ph on September 04, 2008, 03:40:29 am

Title: remote VL using VNC or other way..
Post by: hata_ph on September 04, 2008, 03:40:29 am
I am planning to setup VL 5.9 as a file server using samba. The samba part is almost done but I would like to remote admin the server either using VNC or other way. For my normal windows server I am using VNC to remote monitor it. How can I do it in linux?
Title: Re: remote VL using VNC or other way..
Post by: bigpaws on September 04, 2008, 06:15:17 am
SSH is great for that purpose, besides a secure server
does not run X.

If you are not able to use that. Then you could use many
other things:

X on ssh forwarding
VNC
RDP

Just to mention a few.

Bigpaws
Title: Re: remote VL using VNC or other way..
Post by: hata_ph on September 04, 2008, 06:20:35 am
I am able to console to my VL using PUTTY from my windows client.....but I would prefer to have X together as I am still new to CLI....

I would be nice to have a guide or how-to on how to use the below mentioned method that work well for VL59. :P

EDIT:

I have found some nice example on using X on ssh forwarding....will try it asap...

http://www.vanemery.com/Linux/XoverSSH/X-over-SSH2.html
http://gentoo-wiki.com/HOWTO_X-forwarding
http://www.ibm.com/developerworks/aix/library/au-tunnelingssh/index.html
Title: Re: remote VL using VNC or other way..
Post by: bigpaws on September 04, 2008, 09:48:05 am
Sounds like an excellent idea, After you write it
put in the Howto Section.

Bigpaws
Title: Re: remote VL using VNC or other way..
Post by: hata_ph on September 05, 2008, 05:42:05 am
OK. I have manage to ssh forward X using Putty in my XP/Vista client.....below is the step...

1. enable SSH services using VASM
2. enable some command in your /etc/ssh/ssh_config and sshd_config...

ssh_config
Quote
#   $OpenBSD: ssh_config,v 1.22 2006/05/29 12:56:33 dtucker Exp $

# This is the ssh client system-wide configuration file.  See
# ssh_config(5) for more information.  This file provides defaults for
# users, and the values can be changed in per-user configuration files
# or on the command line.

# Configuration data is parsed as follows:
#  1. command line options
#  2. user-specific file
#  3. system-wide file
# Any configuration value is only changed the first time it is set.
# Thus, host-specific definitions should be at the beginning of the
# configuration file, and defaults at the end.

# Site-wide defaults for some commonly used options.  For a comprehensive
# list of available options, their meanings and defaults, please see the
# ssh_config(5) man page.

Host *
ForwardAgent yes
ForwardX11 yes
#   RhostsRSAAuthentication no
#   RSAAuthentication yes
#   PasswordAuthentication yes
#   HostbasedAuthentication no
#   GSSAPIAuthentication no
#   GSSAPIDelegateCredentials no
#   BatchMode no
#   CheckHostIP yes
#   AddressFamily any
#   ConnectTimeout 0
#   StrictHostKeyChecking ask
#   IdentityFile ~/.ssh/identity
#   IdentityFile ~/.ssh/id_rsa
#   IdentityFile ~/.ssh/id_dsa
#   Port 22
#   Protocol 2,1
#   Cipher 3des
#   Ciphers aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc
#   EscapeChar ~
#   Tunnel no
#   TunnelDevice any:any
#   PermitLocalCommand no

sshd_config
Quote
#   $OpenBSD: sshd_config,v 1.74 2006/07/19 13:07:10 dtucker Exp $

# This is the sshd server system-wide configuration file.  See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented.  Uncommented options change a
# default value.

#Port 22
#Protocol 2,1
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_dsa_key

# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 768

# Logging
# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
#LogLevel INFO

# Authentication:

#LoginGraceTime 2m
#PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6

#RSAAuthentication yes
#PubkeyAuthentication yes
#AuthorizedKeysFile   .ssh/authorized_keys

# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes

# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no

# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes

# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes

# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication.  Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
#UsePAM no

AllowTcpForwarding yes
#GatewayPorts no
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#UsePrivilegeSeparation yes
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10
#PermitTunnel no

# no default banner path
#Banner /some/path

# override default of no subsystems
Subsystem   sftp   /usr/libexec/sftp-server

# Example of overriding settings on a per-user basis
#Match User anoncvs
#   X11Forwarding no
#   AllowTcpForwarding no
#   ForceCommand cvs server

3. Install Putty and Xming in your windows client....you may use other x server too...
4. Use putty to ssh to my VL59. And remember to click the X11 forwarding option in your putty......

PS: But then I still cannot X forward the whole WM/DE in my XP/Vista using putty....do anyone know how?
Title: Re: remote VL using VNC or other way..
Post by: bigpaws on September 05, 2008, 08:02:03 am
You need a X server on XP.

Google slackware x forward XP

Bigpaws
Title: Re: remote VL using VNC or other way..
Post by: rbistolfi on September 05, 2008, 09:37:20 am
Xming seems to be a good solution.
Title: Re: remote VL using VNC or other way..
Post by: hata_ph on September 05, 2008, 10:24:08 am
You need a X server on XP.

Google slackware x forward XP

Bigpaws

I can open any GUI app using putty but just now able to run the whole wm like this...
http://www.vanemery.com/Linux/XoverSSH/win32-X-6.jpeg
Title: Re: remote VL using VNC or other way..
Post by: wcs on September 12, 2008, 06:43:28 am
I've been noting down things for a HowTo on TightVnc and x11vnc through ssh with vector.
(only been quite busy)

But give it a try. x11vnc is in the repos. I use tightvnc on the client side to view the desktop... I don't think it's in the repos, but I've also been looking at packaging it.
Title: Re: remote VL using VNC or other way..
Post by: hata_ph on September 12, 2008, 08:21:33 am
Actually it is working quite well even without the use of VNC..but it would be nice if anyone can provide a howto on x11vnc or any other vnc software... :P
Title: Re: remote VL using VNC or other way..
Post by: newt on September 12, 2008, 08:28:52 am
I can open any GUI app using putty but just now able to run the whole wm like this...
http://www.vanemery.com/Linux/XoverSSH/win32-X-6.jpeg
Can you accomplish this by starting X via your ssh shell?  In other words, ssh to the remote maching and then 'startx'.
Title: Re: remote VL using VNC or other way..
Post by: hata_ph on September 12, 2008, 11:08:55 am
if my linux host is already running in GUI mode, startx does nothing...
if my linux host is running on TUI mode, typing startx via PuTTy will only start the WM on my linux host but not on my Vista client that ssh remote to it...
Title: Re: remote VL using VNC or other way..
Post by: bigpaws on September 12, 2008, 12:21:07 pm
Specify your display

Bigpaws
Title: Re: remote VL using VNC or other way..
Post by: hata_ph on September 12, 2008, 06:49:05 pm
Specify your display

Bigpaws

Dun understand your question.... :-\
Title: Re: remote VL using VNC or other way..
Post by: bigpaws on September 12, 2008, 06:59:56 pm
That was a statement. Specify the display you wish to use.

Bigpaws
Title: Re: remote VL using VNC or other way..
Post by: hata_ph on September 12, 2008, 07:06:37 pm
That was a statement. Specify the display you wish to use.

Bigpaws

I hope this time I get you right. I plan to remotely view my VL server either via VNC or x11vnc with GUI. But right now I feel conformable manage it remote via some CLI and some GUI application. So now I don't feel a rush of using VNC.......
Title: Re: remote VL using VNC or other way..
Post by: newt on September 12, 2008, 09:44:05 pm
Back to what bigpaws was saying.  I believe that he's suggesting that you export the display prior to starting X so that the entire WM/DE will show up.  It takes the format:
export DISPLAY=hostname:displaynumber.screennumber

ex)
export DISPLAY=your.computers.ip.address:0.0

..and then 'startx' (while your linux host is in TUI).

Nothing to install; nothing to configure - should be an easy test.