sudo userdel -r [username]
sudo userdel -r [username]
I’ve been using SSH (Secure shell) for a looooong time on my Linux based systems for remotely controlling my headless servers. During this week I had a guy over at my desk that wanted to have a look at some of my settings on my Ubuntu box to see the difference in configs between what he has done and what I have done differently. I quickly jumped into putty on my windows box (since that is my daily workstation because of VS2010 ) and connected to my server remotely.
Opened up nautilus on linux so I could visually browse to my config files (could have probably done this through shell too), Nautilus then opened up in my windows OS as any other window would have. Since the other guy has never seen this he was obviously shocked to see the window appearing in my windows environment. I then went off to explain to him how this works and thought that I would share this since a couple of people have asked me “HOW DO YOU DO THAT” before, so here goes.
Remote-X (not the official name I think , but that’s what I call it ) is enabled via ssh or secure shell. SSH is a protocol used to securely access a Unix/Linux machines from another that allows you to run command line and graphical apps remotely and also for file transfers or creating secure networks over the internet to tunnel through(such as a remote http proxy or so). To accomplish this we would need 2 things.
Note that is a lot more uses for ssh such as secure ftp connections but I am just going to explain the basics to get a remote connection with openssh and remote X execution from a windows box.
First thing to-do is to get Open ssh setup on your Linux box (I am using Ubuntu 10.04 so my commands provided relates to Ubuntu).
Install Open ssh on your Ubuntu box via the following command
sudo apt-get install openssh-server
Once this is done you can change your configs as needed (have a look in the man file. man sshd_config for more info or just lookup sshd on the ubuntu site)
Now we just need to get the openssh daemon running and we’re set on the server side. This can be done with the following command.
sudo /etc/init.d/ssh restart
From a client side perspective , most machine would have a client to connect to a server via ssh such as putty. Ubuntu just needs the client downloaded to it and your set, since you have X-server doing all the X windows stuff on ubuntu by default, you won’t have a problem at all in opening the X-apps remotely that sits on your server.To get that client you can simply run the following command and then connect via that client once your set.
sudo apt-get install openssh-client
Once these 2 apps are installed you are all set to connect to your server.
To check that the whole process as explained before was successful, we will try and connect to our Linux server over ssh.
Sooooo , that’s quite a process on paper, but its actually very simple once you’ve tried it. You can then execute any X-window app remotely with convenience and this is very useful if you have multiple Linux of Unix machines that you work off.
Try this out if you have a remote scenario and let me know if you come right, if you struggle or have some questions.Drop me a comment or question and we’ll take it from there.
Happy computing. Ciao ciao