I am trying to change the ports but after editing I can not save file or replace existing file.Yes, it is possible. You edit a file called "services" it is in /etc or /var/etc depending on image.
part of it looks like this:
ftp 21/tcp
ssh 22/tcp # SSH Remote Login Protocol
ssh 22/udp # SSH Remote Login Protocol
You just change 21 to whatever you want.