Thursday, May 21, 2020

Setup mRemoteNG with SAP Gui Connections (auto logon)



I use and would recommend mRemoteNG to manage windows and linux servers for SSH and RDP access.
mRemoteNG offers more options and can be downloaded from the following link.




“It allows you to view all of your remote connections in a simple yet powerful tabbed interface.


mRemoteNG supports the following protocols:


RDP (Remote Desktop/Terminal Server)
VNC (Virtual Network Computing)
ICA (Citrix Independent Computing Architecture)
SSH (Secure Shell)
Telnet (TELecommunication NETwork)
HTTP/HTTPS (Hypertext Transfer Protocol)
rlogin
Raw Socket Connections”


This blog will use mRemoteNG external tools options to link to SAP GUI and setup a demo of auto logon

External tools reference link




Some version information on my system
SAPGUI = 760 Final Release,  7600.1.0.1156
mRemoteNG = 1.76.20.24615





The SAP system I will use in this blog is the SAP developer NPL edition.


Link mRemoteNG to SAPGUI


The process to link mRemoteNG is to use the External Tools feature to use the SAP Short Cut command for SAPGUI.


SAP GUI sapshcut


Checking the options offered by SAPGUI Shortcut with the help option


"C:\Program Files (x86)\SAP\FrontEnd\SAPgui\sapshcut.exe" /help
(I have standard install following the standard install directory)






From the options in the screenshots those of interest are
-system=  -client -user= -pw=  -guiparm= 
This will enable the signon to the SAP NPL system via sapshcut
I will also use the -maxgui option maximise the gui.


Setup mRemoteNG External Tools with sapshcut


Check the mremoteng website for explanation of the external tools feature.




Important part is the variables that allow the configuration to use the sapshcut parameters to logon to SAP.


Variables

Variables and arguments can be used to tell the external tool what to do.
This is the list of variables supported by mRemoteNG:
  • %NAME%
  • %HOSTNAME%
  • %PORT%
  • %USERNAME%
  • %PASSWORD%
  • %DOMAIN%
  • %DESCRIPTION%
  • %MACADDRESS%
  • %USERFIELD%
As it is not an exact match I will use the following options to match up to the sapshcut parameters.

Standard Options
SAPSHCUT Parameter
mREMOTENG Variable
-system
%NAME% 
-client
%MACADDRESS%
-user
%USERNAME%
-pw
%PASSWORD%
-guiparm
%HOSTNAME% %DOMAIN%

** Special Character Passwords
USE the ! option as follows
-pw
%!PASSWORD%

For the SAP NPL system which has standard values for these parameters.


-system=NPL
-client=001
-user=developer
-pw=Down1oad
-guiparm=vhcalnplci 00


For guiparm it is important to leave a space between the hostname and instance number of the NPL system.
I found it is not possible to use mRemoteNG %PORT% variable as sapshcut expects two digits for the instance number e.g. using port 0 would not work for the instance number 00.


**For the password option -pw you need to decide if it is appropriate to fill in this value and consider password protecting the connection file with the following option.
The NPL developer password is a well known password so visible in this blog :).




Setup mRemoteNG External Tools
The mRemoteNG site linked earlier is useful to setup the external tools. 
The feature is under the Tools->External Tools menu


Select New


I use the following options




Display Name SAPGUI
Filename: C:\Program Files (x86)\SAP\FrontEnd\SAPgui\sapshcut.exe
Arguments: -system=%NAME%  -maxgui -client=%MACADDRESS% -user=%USERNAME% -pw=%PASSWORD%  -guiparm=%HOSTNAME% %DOMAIN%

***Remember to leave a space between hostname and instance number.

***Remember to adjust %PASSWORD% to %!PASSWORD% for any special characters in the password
Arguments: -system=%NAME%  -maxgui -client=%MACADDRESS% -user=%USERNAME% -pw=%!PASSWORD%  -guiparm=%HOSTNAME% %DOMAIN%

Setup a new connection with option Protocol = Ext. App and select SAPGUI (the name used for the external tool which will be a drop down action when external app is selected




Complete the connection entries for the NPL system




For the icon of the external tool I used an SAP ICO image as follows


SAP Icons web site
Link the the icon I downloaded


Copy the icon to the Icons mRemoteNG directory here (i used standard install locations)
C:\Program Files (x86)\mRemoteNG\Icons
You can then select this icon for the mRemoteNG connection (you may have to restart mRemoteNG to pick up the copied file)




Test the connection either double click the icon or right click and connect
*** dont forget to check SAP NPL is actually up and running :) or the system you have adapted these settings for ;)




If you used the password option you will be automatically logged on to NPL. Or the password will be prompted for the user defined.
For other system with multiple users or different clients you could create multiple connections for the clients/users required.

YouTube Video demonstration


No comments:

Post a Comment

Google +