My Quick Guide for a Linux setup on VMWare (Ubuntu/Debian)

This post is written for Debian but will work for other Debian based linux distros like Ubuntu. Debian is my personal favourite as it is stable, clean, fast and easy-to-use/configure. There is a wealth of information about Debian on the net, and the debian.org web-site is quite comprehensive and helpful.

So you have installed a Debian 5 (Lenny) distro on a virtual machine in VMWare and cygwin on your windows desktop. This is a quick guide (doubles as a reference/reminder for myself) on how to install stuff and get you going.

As stated above I assume this is where you are:
  • You've downloaded an ISO image from your favourite distro web-site (Ubuntu/Debian).
  • You have installed the distro on a VMWare instance and you gave it a name (e.g. 'debian5')
  • You have a 'root' account and your own named account (e.g. 'username'), advisable to use the same username you use for Windows (helps when accessing your computer from cygwin)
  • You have cygwin installed on your PC. (I will need to write a guide for cygwin installs one day)
  • You have WinSCP and Putty installed somewhere on your PC.
On your Linux box, through the VMWare console, open a shell and log in as root:

su - root

Update your system and install ssh:

apt-get update
apt-get install ssh

Find out what the IP address of your linux install is by typing:

ifconfig

On your PC now, edit the %SYSTEMROOT%\system32\drivers\etc\hosts file and add an entry for your linux box, i.e.:

192.168.xx.xxx debian5

where 'debian5' I assume is the name of your machine.

Ensure you can ping your Linux box from your PC command line:

ping debian5

After this, you can open a WinSCP session to your linux box to verify that ssh is working properly (for the time being).

Now, the next thing I do, is to open the .bashrc file from the root's home folder and add the following lines:

export PS1='\n\[\033[1;31m\]\u\[\033[1;37m\]@\[\033[0;31m\]\h\n\[\033[0m\][\[\033[1;33m\]\w\[\033[0m\]] '
umask 077
alias l="ls -lFa --color=auto"


This gives you a nice prompt and a nice alias for "l".

Do the same for your named user, edit /home/username/.bashrc and add:

export PS1="\n\[\033[1;36m\]\u\[\033[1;37m\]@\[\033[0;36m\]\h\n\[\033[0m\][\[\033[1;33m\]\w\[\033[0m\]] "
umask 077
alias l="ls -lFa --color=auto"

This gives you a different color for the prompt for your named user.

At this moment, we have SSH installed and we can connect to our Linux virtual machine from Windows using WinSCP or cygwin (try ssh -l username debian5). I now much prefer to minimize VMWare and use cygwin, Putty and WinSCP for the rest. We can fully administer our Linux install using these tools and we don't have to use the mouse too much. Such fun!

From cygwin try:

ssh debian5 (<-- this uses your named account (good to have macthing usernames for Windows/Linux) ssh -l root debian5 or ssh root@debian5

I now usually create a '/u01' folder where all my machine-wide stuff goes, like special installations of java, tomcat, and other tools that are not OS related go.

Logged in as root:

groupadd admin
mkdir /u01
chown username:admin /u01
chmod 774 /u01


Using ssh with Public Key Authentication

On your PC (client), you need to generate a key pair. Using cygwin type:

ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/ksymeon/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/ksymeon/.ssh/id_rsa.
Your public key has been saved in /home/ksymeon/.ssh/id_rsa.pub.
The key fingerprint is:
e8:bb:5f:d5:e0:f1:49:88:01:38:c1:cd:7d:b4:94:99 xxxxxxx@xxxxxx

You now have the public and private keys in your .ssh folder on your cygwin install.

Next thing to upload your public key to your linux box. The content of your public key needs to be added to the ~/.ssh/authorized_keys2 file on your linux box. You can have multiple authorised keys for your account. I use different keys for each different machine I use to connect to my servers, i.e. my laptop has a different key than my desktop.

Using cygwin log in to your linux box:

ssh debian5

Create the .ssh folder under your home (~) folder:

mkdir .ssh
chmod 700 .ssh

Open another local cygwin shell, copy your public key securely to your linux box:

scp id_rsa.pub debian5:~/.ssh/temp.pub

From your remote cygwin shell, get into your .ssh folder and check the temp.pub is there:

cd .ssh
ls -lFa

Append the public key to your authorised keys and delete it:

cat temp.pub >> authorized_keys2
rm temp.pub

Now, back to you cygwin prompt, try to ssh again into your linux box:

ssh debian5
Enter passphrase for key '/home/xxxxxx/.ssh/id_rsa':

You see that instead of your password, the passphrase is required.

You can now add your public key to other accounts, for example the root account if you would like to log in as root directly from your PC. Otherwise you can always log in as yourself and 'su - root' after you are in.

This is as far as I can go now, more to come in a different post.

Comments

psarog said…
I left your post around this sentence: "Debian is .... and easy-to-use/configure"
Why buy telegram members?
Most people who set up a telegram channel want to create an internet business, but how can we make money from our telegram and channel? The prerequisite for answering this question is how much membership we have. Usually, at the beginning of the road, an buy telegram members will be a very difficult and time-consuming task and you should not expect growth and revenue from your channel or group until you have a large number of members.


To buy real telegram members, you can easily search for the Increase telegram member on Google and then select a reputable advertising company and give them the job.


Forced Add is a method of adding users to channels, which is done by some unofficial telegrams. As buy telegram channel members and is widely used in various countries, many informal telegrams have entered the competition arena. These unofficial telegrams add a lot of functionality to the main telegram.

In this way, the Increase telegram member will send a message to users buy telegram group members, and people will only see what your channel name is and if they want or need your channel, they will join your channel.


Similar to the buy telegram channel subscribers, push notification is used, except that the message you send contains your photo and ad text like a banner.
Instagram is the most popular software among us Iranians and the whole world. From 2010 until today, it has always surprised us with its new updates! So never forget to download the new Instagram. You can share your photos and videos on Instagram. Other people will see, like, and comment on your photos and videos. With Instagram update, you can always be updated and enjoy new features.

Download Instagram app for Android, Instagram update

What are the features of Instagram?

Buy Instagram followers

Ability to share photos and videos

Follow people to see posts

Like and comment on people's posts

Share live videos with followers

Ability to put different effects and filters on photos and videos

Chat with people privately (Direct)

Ability to privatize Instagram page

Ability to have multiple accounts simultaneously
Before we get into the Sacramento Star coin purchase, let’s briefly talk about the Sacramento Star game. The SOCCER STARS game, which runs on Android and iOS, has taken the place of the Clash of Clashes game. This game is a mini-clip making company. The company put its strengths and weaknesses in the hands of gamers with smartphones and invited them to play football. The game is not only doubles football, but also like billiards. The amazing ideas put into the game plan keep the player busy for hours on the phone and as long as the coins are there, the player likes to keep playing. This is the best game in this genre.







In the game of Sacramento, one of the players has to put the ball in the second-half. Something like football! soccer stars Why Buy soccer Star Coins? The more coins you have, the higher you can get and the more cups you can earn.

Popular posts from this blog

GetDIBits vs. Scanline vs. Pixels[] in Delphi Bitmaps

Installation of Ubuntu 17.04 (Zesty Zapus) on VMWare Workstation

CyLog Raster Fonts for Linux