About Me

My photo
Bangalore, India
I am an Oracle Certified Professional working in SAP Labs. Everything written on my blog has been tested on my local environment, Please test before implementing or running in production. You can contact me at amit.rath0708@gmail.com.
Showing posts with label Unix. Show all posts
Showing posts with label Unix. Show all posts

Monday, December 16, 2013

How to change ssh port to a non default port in Unix

Yesterday I have to change default ssh port from 22 to 1022. This change in port from default to non-default  enhances security of your server a little bit. Changing port from 22 to 1022 will stop automated attacks and it becomes difficult to guess from which port server is accessible.

Solution :-

1. As root user edit the sshd_config file in /etc/ssh location.

edit Port 22 to Port 1022

2. Before changing port to a non default value, check port is not being used by any other server.

3. Once Port has been changed in /etc/ssh/sshd_config file , restart SSH service :-

  #stopsrc -s sshd
  #startsrc -s sshd

  or by 

  #service sshd restart

4. Check that the changed port is working:-

ssh -p 1022 server1

I hope this article helped you.

Regards,
Amit Rath

Wednesday, July 31, 2013

Add or Reduce Filesystem size in AIX

In AIX operating systems we can change the FS size whenever we want it to do but for that we need to check that the Volume Group associated to that FS have Free space or Free PP's.

Steps to Change FS size :-

We are adding 2g Space in /home FS . PFB steps :-

1. Check that the Volume Group have free space available :-













We can see that Free PP's are only 896 MB. We have to free some space from available FS in the Volume Group.

2. Free some space from other FS in this Volume Group so that we can add 2g space in /home partition.
This can be done by CHFS command.


3. Now check Free PP's in the Volume group :-













We can see that around 3g space is availabe in rootvg. Now add 2g space in /home partition using CHFS command.




2 gb space has been added to /home partition.

I hope this article helped you.

Regards,
Amit Rath