Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
Hello everyone, I read about a bsd set up of allowing a user to telnet into a workstation or server while X is running, and it will have the X ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2003
    Posts
    8

    Connecting to the X Server remotely


    Hello everyone, I read about a bsd set up of allowing a user to telnet into a workstation or server while X is running, and it will have the X desktop on the users screen, similar to Window's Terminal Services. I haven't been able to locate the document any more and wondering how to set it up on Linux, I am using Debian/Linux.

    Any suggestions are welcome, I am a little new to debian, been working on slackware for a couple of years though, so my feet are nearly wet enough for some fun

  2. #2
    Linux Enthusiast
    Join Date
    Jun 2002
    Location
    San Antonio
    Posts
    621
    This can be done through telnet and a series of commands. If you write a script to telnet in, use a username and password that they allow, and just `export DISPLAY=$your_ip_number:0` then run apps from their computer, like gaim, or something like that. It will send the output from their computer to yours. Pretty cool what you can do with linux, eh?
    I respectfully decline the invitation to join your delusion.

  3. #3
    Just Joined!
    Join Date
    Mar 2003
    Posts
    8
    Awesome..thanks for the quick reply ! I am loving linux, with linux and bsd there really is no need to what it can do. I mean the source is availible so there is pretty much no restriction. The only thing that kept me from going to a total linux workstation is that i needed windows software for my cisco class labs. We had software that would simulate a cisco based network with routers and stuff, did the labs at home and saved the configuration of the routers onto floppy. The software and wine never got along, worked fine until I had to save the data onto the floppy, crashed like you wouldn't beleive hehe.

    Debian is pretty interesting, after working with slackware for a long time I thought I was pretty decent with linus, I am learning more things while working wirh debian. Haven't figured out if those were "linux" things or debians yet hehe.

  4. #4
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    I would recommend using ssh with X11 forwarding instead, since it works through firewalls (and it's encrypted). To ssh with X11 forwarding, use ssh -X or enable it in your ssh config file (if it isn't enabled by default, that is).

  5. #5
    Linux Enthusiast
    Join Date
    Jun 2002
    Location
    San Antonio
    Posts
    621
    that is a better answer, and is what I used when I would clock in to work from my house He asked about telnet though, so that is what I tried to answer.
    I respectfully decline the invitation to join your delusion.

  6. #6
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Yeah, I know, and it's what I would have answered as well. I just wanted to add ssh as an alternative.

  7. #7
    Just Joined!
    Join Date
    Mar 2003
    Posts
    8
    ssh does add a nice alternative to telnet. I really should start worrying about security a little more, just that right now it's to be used on my private lan at home.

  8. #8
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    That's what I thought at first, too, but then I discovered that it's not only security. If you use public key authentication, for example, you don't need to enter your password at all (and it's still secure!), and it provides for universal X forwarding and lots of other goodies.
    I would also suggest adding this key binding to your window manager:
    Code:
    xterm -T ssh -e 'echo -n "Hostname: "; read hostname; exec ssh $hostname'

  9. #9
    Just Joined!
    Join Date
    Mar 2003
    Posts
    8
    Not putting in the password everytime would be great ! I haven't messed with custom key bindings at all, will have to break open the WM's docs and see how to do just that.

    Where did you learn so much ? I recently took a linux class and the instructor didn't teach me anything that I hadn't already knew. It's hard to find material on linux that is for the ones that are between newbie and advanced

    Right now all I can do is just try new things out, like setting up samba or apache, figured that is the best way to learn.

  10. #10
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Trying out new things _is_ the best way to learn; that's the way I've learned virtually everything, and I think wassy and others agree with me. All classes that I've taken have been completely worthless. I ended up teaching the teachers instead. The bad part is that no employer will ever know that you know anything... =( Just don't forget: the manpages are your friends. Also, tldp.org is a great place to find an attack vector if you want to try something new.

    To create a ssh RSA key, run "ssh-keygen -t rsa". That will generate a secret key which it puts in ~/.ssh/id_rsa, and the corresponding public key, ~/.ssh/id_rsa.pub. Then, just add that public key to every computer to which you want to log in password less by appending the contents of id_rsa.pub to ~/.ssh/authorized_keys (like in "cat id_rsa.pub >>~/.ssh/authorized_keys", provided you have copied id_rsa.pub to that computer; you can use scp for that, or home directories on NFS is also a good idea, if that's possible for you).
    Note 1: The sshd server must be configured to use public key authentication; if it isn't, add "PubkeyAuthentication yes" to /etc/ssh/sshd_config, and restart or reload sshd.
    Note 2: If you're using an older sshd implementation, do "ln ~/.ssh/authorized_keys ~/.ssh/authorized_keys2". I'm not really sure why, but I'm guessing that it's some sort of migration thingie.
    Note 3: The way this works is that basically, the sshd that you're connecting to generates a random string, which it sends to your ssh client, which signs it with your private key. Then it sends the signature back to sshd, which verifies it for authenticity.
    Note 4: If you don't know how RSA works, here's the basic theory: You have a "secret key"; it consists of two very large prime numbers. Then you have the "public key", which is the product of those two prime numbers. Since they're so large, it would take thousands of years for even the best Cray supercomputer in the world to find which two prime numbers your secret keys consists of if they only have the public key. Therefore, you're encouraged to essentially put your public key on your business cards, your home page, on public boards and everywhere. The secret key, however, is obviously very, very secret. Now the real strength of RSA is that if you encrypt something with the public key, it can only be decrypted with the secret key, so anyone who has your public key can encrypt something and send it to you, but only you can decrypt it. Likewise, you can encrypt something with your secret key, which can only be decrypted with the public key. While you might not see the obvious use for this, it's used for signing. If you encrypt something with your secret key, anyone can decrypt it, but they will know for sure that it was you who encrypted it.
    Note 5: For more info, see ssh(1), sshd(8), ssh-keygen(1), ssh_config(5), scp(1) and sftp(1), ssh-agent(1), ssh-add(1). The last two are more advanced authentication features.

    I can't believe you don't use keybindings? That's the first thing I decided to find out when I first started X, about one and a half years ago.

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •