If you only have SSH access to a Mac OSX server and need some details on the machine you can use these commands to help.
uname -a
Darwin MyMacMini 15.3.0 Darwin Kernel Version 15.3.0: Thu Dec 10 18:40:58 PST 2015; root:xnu-3248.30.4~1/RELEASE_X86_64 x86_64
sw_vers
ProductName: Mac OS X ProductVersion: 10.11.3 BuildVersion: 15D21
System_Profiler can get you a lot of the information you are likely looking for but it pulls a lot of information so initially you may want to output it to a text file and determine what you need.
system_profiler | more > sys.txt
Of course you can do a simple grep command to filter through system_profiler
system_profiler | grep Memory
Memory: 4 GB Memory: Upgradeable Memory: Yes Secure Virtual Memory: Enabled
The sysctl command is capable of getting a lot of information (see Mac Man Page)
sysctl kern.ostype kern.osrelease kern.osrevision kern.version kern.maxvnodes kern.maxproc kern.maxfiles kern.argmax kern.securelevel kern.hostname kern.hostid kern.clockrate kern.posix1version kern.ngroups kern.job_control kern.saved_ids kern.boottime vm.loadavg vm.swapusage net.inet.ip.forwarding net.inet.ip.redirect net.inet.ip.ttl net.inet.icmp.maskrepl net.inet.udp.checksum hw.machine hw.model hw.ncpu hw.byteorder hw.physmem hw.usermem hw.memsize hw.pagesize user.cs_path user.bc_base_max user.bc_dim_max user.bc_scale_max user.bc_string_max user.coll_weights_max user.expr_nest_max user.line_max user.re_dup_max user.posix2_version user.posix2_c_bind user.posix2_c_dev user.posix2_char_term user.posix2_fort_dev user.posix2_fort_run user.posix2_localedef user.posix2_sw_dev user.posix2_upe
kern.ostype: Darwin kern.osrelease: 15.3.0 kern.osrevision: 199506 kern.version: Darwin Kernel Version 15.3.0: Thu Dec 10 18:40:58 PST 2015; root:x nu-3248.30.4~1/RELEASE_X86_64 kern.maxvnodes: 66560 kern.maxproc: 1064 kern.maxfiles: 12288 kern.argmax: 262144 kern.securelevel: 0 kern.hostname: MyMacMini kern.hostid: 0 kern.clockrate: { hz = 100, tick = 10000, tickadj = 2, profhz = 100, stathz = 10 0 } kern.posix1version: 200112 kern.boottime: { sec = 1459339211, usec = 0 } Wed Mar 30 08:00:11 2016 vm.loadavg: { 0.77 0.80 0.84 } hw.machine: x86_64 hw.model: Macmini6,2 hw.ncpu: 8 hw.byteorder: 1234 hw.physmem: 2147483648 hw.usermem: 1363705856 hw.memsize: 4294967296 hw.pagesize: 4096