I don't know how to remotely access to a virtual machine running a ubuntu server which has openssh server. Is there anyone can guide that if i want to access this virtual machine from anywhere, what should i do step by step ? Thanks :)
This depends on how is your network configured, where is your remote server (same LAN, different LAN or internet for example) but I will try to give you the info related to ssh considering the network part is ok so you can ping your server from your machine. If this is not the case, you have 1st to figure out how to solve the networking problem before using ssh.
If your local machine is linux, you only need to issue:
where user is the user you created on your remote server (if you just installed it and installed openssh-server without configuring it, this user will be allowed to ssh in the server).
and remote-machine is whatever you use to ping the machine (ip, hostname or url).
If your local machine is windows, install putty (putty site and configure user and remote-machine in the config.
Mainly if the remote machine is accessible from internet, this default config is not secure and you should configure
Just saw in your comments your vm is behind NAT so to reach it you will need to forward port 22 to it on the router.