Archive

Archive for the ‘Unix’ Category

Connect to Oracle Linux O/S without password !!

DISCLAIMER : Do not attempt this on critical or Production System.

I run multiple VirtualBox hosting Oracle Linux with Oracle database. It’s like a playground for me to do lot of oracle stuff.

Every time I have to take a connection , It’s painful to enter id/pwd for these so called playground system.

Started doing a little search as to how other fellow DBAs are getting away with this issue. Here is a little cheat trick that can be applied on non-critical systems.

Putty doesn’t give you an option to store password, but it does give you an option to store user name. Refer to below screenshot.

Image

Assuming user ‘neeraj’ was already created in Oracle Linux O/S , let take a connection by specifying password

Image

Let’s create a dir .ssh into /home/neeraj

Next challenge is how to avoid entering password everytime a connection is established to OL ( Oracle Linux ) via account ‘neeraj’

Here is a little cheat trick

Download Putty Keygen software from this url andopen the same. Keep settings as show below.

Image

Click on generate button and randomly move mouse on blank area to generate a random key. Within a min, you would see similar to this

Image

Click “Save Private Key button” and save Private key on local drive.

Note : If anyone get hold of this Private key, they can access your Virtual Machine running within VirtualBox without the need to enter id/pwd.

Next step is to open saved Private key ( C:\Misc_Things\test.ppk ) in notepad and copy the lines that represent PUBLIC key in clipboard

Image

Since there are 3 lines , make sure to combine all line and create sort of single line which represents Public Key.

Since your putty session via ‘neeraj’ account is still active , go into following dir /home/neeraj/.ssh/

and create a file called authorized_keys and paste that 1 line which represents public key

Image

Notice we have to insert ” ssh-rsa ” in front of our public key. There is a space in front and end of keyword ssh-rsa. Click on above screenshot to see a large image file

Now configure existing putty connection to use Private Key as shown below

Image

Now take a fresh connection …. Voilla as seen in below screenshot , we dint had to enter pwd , it utilized Private/Public key and authenticated our dummy account ‘neeraj’

Image

How to enable ftp on VirtualBox

You can transfer file from your local machine to virtual box via shared folders or via ftp.

By default looks like ftp is blocked on Virtual Box

Just inside your guest O/S i.e. VirtualBox Linux go to

/etc/xinetd.d/

and modify gssftp file

Change from ‘Yes’ to ‘No’ for DISABLE column as shown in below screenshot and remove value against “server_args”

ftp

 

 

 

 

 

You can restart ftp service via following command

/etc/init.d/xinetd restart

 

Categories: Linux, Oracle blogroll, Unix Tags: ,

How to check if Linux version is 32 bit or 64 bit

You can use following methods

Use this command getconf LONG_BIT

or use this on unix prompt

uname -m

Categories: Linux, Unix Tags: , ,