Index: issm/trunk-jpl/src/m/utils/OS/ispetsc.py
===================================================================
--- issm/trunk-jpl/src/m/utils/OS/ispetsc.py	(revision 12733)
+++ issm/trunk-jpl/src/m/utils/OS/ispetsc.py	(revision 12743)
@@ -37,2 +37,3 @@
 
 	return flag
+
Index: issm/trunk-jpl/src/m/utils/OS/issmscpin.m
===================================================================
--- issm/trunk-jpl/src/m/utils/OS/issmscpin.m	(revision 12733)
+++ issm/trunk-jpl/src/m/utils/OS/issmscpin.m	(revision 12743)
@@ -35,5 +35,5 @@
 		[status,ISSM_DIR]=system('echo [%ISSM_DIR_WIN%]');
 		if status, 
-			error('scpin error message: could not find ISSM_DIR_WIN envirnoment variable');
+			error('scpin error message: could not find ISSM_DIR_WIN environment variable');
 		end
 		ISSM_DIR=ISSM_DIR(2:end-2);
Index: issm/trunk-jpl/src/m/utils/OS/issmscpin.py
===================================================================
--- issm/trunk-jpl/src/m/utils/OS/issmscpin.py	(revision 12743)
+++ issm/trunk-jpl/src/m/utils/OS/issmscpin.py	(revision 12743)
@@ -0,0 +1,79 @@
+"""
+SCPIN get packages from host, using scp on unix, and pscp on windows
+ 
+    usage: scpin(host,packages,path)
+ 
+ 
+"""
+
+import socket
+import platform
+import subprocess
+import os
+import shutil
+from MatlabFuncs import *
+
+def scpin(host, login,port,path, packages):
+
+	#first get hostname
+	hostname=socket.gethostname().lower().split('.')[0]
+
+	#first be sure packages are not in the current directory, this could conflict with pscp on windows. 
+	#remove warnings in case the files do not exist
+	for package in packages:
+		try:
+			os.remove(package)
+		except OSError as e:
+			pass
+
+	#if hostname and host are the same, do a simple copy
+	if strcmpi(hostname,host):
+
+		for package in packages:
+			try:
+				shutil.copy(os.path.join(path,package),os.getcwd())    #keep going, even if success=0
+			except OSError as e:
+				pass
+
+	else:
+
+		if 'Windows' in platform.system():
+			#use the putty project pscp.exe: it should be in the path.
+		
+			#get ISSM_DIR variable
+			if 'ISSM_DIR_WIN' in os.environ:
+				ISSM_DIR=os.environ['ISSM_DIR_WIN'][1:-2]
+			else:
+				raise OSError("scpin error message: could not find ISSM_DIR_WIN environment variable.")
+
+			username=raw_input('Username: (quoted string) ')
+			key=raw_input('Key: (quoted string) ')
+
+			for package in packages:
+				try:
+					subprocess.check_call('%s/externalpackages/ssh/pscp.exe -l "%s" -pw "%s" %s:%s %s' % (ISSM_DIR,username,key,host,os.path.join(path,package),os.getcwd()),shell=True)
+				except CalledProcessError as e:
+					raise CalledProcessError("scpin error message: could not call putty pscp.")
+
+		else:
+			#just use standard unix scp
+			#string to copy multiple files using scp: 
+			if len(packages)==1:
+				string=packages[0]
+			else:
+				string='{'
+				for package in packages:
+					string+=packages[i]+','
+				string=string[:-1]+'}'
+
+
+			if port:
+				subprocess.call('scp -P %d %s@localhost:%s %s' % (port,login,os.path.join(path,string),os.getcwd),shell=True)
+			else:
+				subprocess.call('scp %s@%s:%s %s' % (login,host,os.path.join(path,string),os.getcwd),shell=True)
+		
+			#check scp worked
+			for package in packages:
+				if not os.path.exists(os.path.join('.',package)):
+					raise OSError("scpin error message: could not call scp on *nix system.")
+
Index: issm/trunk-jpl/src/m/utils/OS/issmscpout.m
===================================================================
--- issm/trunk-jpl/src/m/utils/OS/issmscpout.m	(revision 12733)
+++ issm/trunk-jpl/src/m/utils/OS/issmscpout.m	(revision 12743)
@@ -26,5 +26,5 @@
 		[status,ISSM_DIR]=system('echo [%ISSM_DIR_WIN%]');
 		if status, 
-			error('scpout error message: could not find ISSM_DIR_WIN envirnoment variable');
+			error('scpout error message: could not find ISSM_DIR_WIN environment variable');
 		end
 		ISSM_DIR=ISSM_DIR(2:end-2);
Index: issm/trunk-jpl/src/m/utils/OS/issmscpout.py
===================================================================
--- issm/trunk-jpl/src/m/utils/OS/issmscpout.py	(revision 12743)
+++ issm/trunk-jpl/src/m/utils/OS/issmscpout.py	(revision 12743)
@@ -0,0 +1,61 @@
+"""
+SCPOUT send packages to a host, using scp on unix, and pscp on windows
+ 
+    usage: scpout(host,path,packages)
+ 
+ 
+"""
+
+import socket
+import platform
+import subprocess
+import os
+import shutil
+from MatlabFuncs import *
+
+def issmscpout(host,path,login,port,packages):
+
+	#get hostname
+	hostname=socket.gethostname().lower().split('.')[0]
+
+	#if hostname and host are the same, do a simple copy
+
+	if strcmpi(host,hostname):
+		for package in packages:
+			here=os.getcwd()
+			os.chdir(path)
+			shutil.rmtree(package)
+			subprocess.call('ln -s %s %s' % (os.path.join(here,package),path),shell=True)
+			os.chdir(here)
+	else:
+		if 'Windows' in platform.system():
+			#use the putty project pscp.exe: it should be in the path.
+		
+			#get ISSM_DIR variable
+			if 'ISSM_DIR_WIN' in os.environ:
+				ISSM_DIR=os.environ['ISSM_DIR_WIN'][1:-2]
+			else:
+				raise OSError("scpout error message: could not find ISSM_DIR_WIN environment variable.")
+
+			username=raw_input('Username: (quoted string) ')
+			key=raw_input('Key: (quoted string) ')
+
+			for package in packages:
+				try:
+					subprocess.check_call('%s/externalpackages/ssh/pscp.exe -l "%s" -pw "%s" %s %s:%s' % (ISSM_DIR,username,key,package,host,path),shell=True)
+				except CalledProcessError as e:
+					raise CalledProcessError("scpout error message: could not call putty pscp.")
+
+		else:
+			#just use standard unix scp
+			#create string of packages being sent
+			string=''
+			for package in packages:
+				string+=' '+package
+			string+=' '
+		
+			if port:
+				subprocess.call('scp -P %d %s %s@localhost:%s' % (port,string,login,path),shell=True)
+			else:
+				subprocess.call('scp %s %s@%s:%s' % (string,login,host,path),shell=True)
+
Index: issm/trunk-jpl/src/m/utils/OS/issmssh.m
===================================================================
--- issm/trunk-jpl/src/m/utils/OS/issmssh.m	(revision 12733)
+++ issm/trunk-jpl/src/m/utils/OS/issmssh.m	(revision 12743)
@@ -18,5 +18,5 @@
 		[status,ISSM_DIR]=system('echo [%ISSM_DIR_WIN%]');
 		if status, 
-			error('issmssh error message: could not find ISSM_DIR_WIN envirnoment variable');
+			error('issmssh error message: could not find ISSM_DIR_WIN environment variable');
 		end
 		ISSM_DIR=ISSM_DIR(2:end-2);
Index: issm/trunk-jpl/src/m/utils/OS/issmssh.py
===================================================================
--- issm/trunk-jpl/src/m/utils/OS/issmssh.py	(revision 12743)
+++ issm/trunk-jpl/src/m/utils/OS/issmssh.py	(revision 12743)
@@ -0,0 +1,43 @@
+"""
+ISSMSSH - wrapper for OS independent ssh command.
+ 
+    usage: 
+       issmssh(host,command)
+"""
+
+import socket
+import platform
+import subprocess
+import os
+from MatlabFuncs import *
+
+def issmssh(host,login,port,command):
+
+	#first get hostname 
+	hostname=socket.gethostname().lower().split('.')[0]
+
+	#if same as host, just run the command. 
+	if strcmpi(host,hostname):
+		subprocess.call(command,shell=True)
+	else:
+		if 'Windows' in platform.system():
+			#use the putty project plink.exe: it should be in the path.
+		
+			#get ISSM_DIR variable
+			if 'ISSM_DIR_WIN' in os.environ:
+				ISSM_DIR=os.environ['ISSM_DIR_WIN'][1:-2]
+			else:
+				raise OSError("issmssh error message: could not find ISSM_DIR_WIN environment variable.")
+
+			username=raw_input('Username: (quoted string) ')
+			key=raw_input('Key: (quoted string) ')
+
+			subprocess.call('%s/externalpackages/ssh/plink.exe -ssh -l "%s" -pw "%s" %s "%s"' % (ISSM_DIR,username,key,host,command),shell=True);
+
+		else:
+			#just use standard unix ssh
+			if port:
+				subprocess.call('ssh -l %s -p %d localhost "%s"' % (login,port,command),shell=True)
+			else:
+				subprocess.call('ssh -l %s %s "%s"' % (login,host,command),shell=True)
+
