Simple, download, unzip, set JAVA_HOME and start here the JBoss wiki should help.
But I suppose you do not mean this.
So what you meant by 'a REMOTE'?
I assume that by "remote" you mean that you have only ssh access to the machine. In that case, download the JBoss AS binary zip file to your PC, then use scp to copy the zip file to the Ubuntu box. Then do the steps Wolf-Dieter outlined.
I suspect that you could also ssh to the Ubuntu machine and then use a command line http utility to get the zip file, but you would first have to get the full URL for the zip file.
For general installation instructions, see http://community.jboss.org/message/203487