Reopen putty every ssh sessions
![reopen putty every ssh sessions reopen putty every ssh sessions](https://electrictoolbox.com/wp-content/uploads/putty-configuration-host-ssh.png)
– You should then see the “MobaXterm SSH Key Generator” Screen. Before starting you should login to the JHPCE cluster in MobaXterm using your Google Authenticator and Password. To make logging in more streamlined and avoid the pop-up windows when you login, you can create an SSH key pair in MobaXterm.
![reopen putty every ssh sessions reopen putty every ssh sessions](https://static.thegeekstuff.com/wp-content/uploads/2017/02/putty-ssh-auth-select-ppk.png)
![reopen putty every ssh sessions reopen putty every ssh sessions](https://think.unblog.ch/wp-content/uploads/2021/06/putty_ssh_key_authentication.png)
OPTIONAL – Setting up SSH Keys in MobaXterm: To login again, double-click on the jhpce01 “Saved Session”, and you should then be prompted for “Verification Code” (which will come from Google Authenticator) and “Password:” – At this point you should be logged into the JHPCE cluster and sitting at a shell prompt.Īfter you exit out of the JHPCE cluster, a “jhpce01” session will be saved as a “Saved Sessions”. (We will get rid of these annoying boxes in a couple of steps). In the lower left, check the box that says “Do not ask this again” and then click “No”. You will then be prompted to save your password. – Once you enter your password correctly, you will see a number of boxes pop up (usually 3) prompting for another Verification Code. You will be prompted for your Google Authenticator “Verification Code”, and then your password. – When you click OK, you will initiate an SSH session to the JHPCE cluster. Click on the “Specify username” checkbox, and enter your JHPCE username in the next field. – On the “Session settings” screen, click on “SSH” – From this screen, click on the “Sessions” icon in the upper left corner. – Once the program is installed, start the MobaXterm program. – Once the program has been downloaded, install it as you would any other Windows program. – Be sure to use the “Installer Edition” instead of the “Portable Edition” – The first thing you will need to do is download the MobaXterm program from their web site Before your proceed you should have your Google Authenticator app available. This FAQ will take you through the steps needed to configure Mobaxterm. There is some configuration that needs to be done though in order to effectively use Mobaxterm in the JHPCE environment. It is a very convenient tool for accessing the JHPCE cluster and utilizing the many features of the cluster. (note: I wasn't able to get clusterssh running on windows cygwin as of july 2014 so i couldn't really speak to how good/bad the program is at accomplishing what OP asked for.) HOSTS=.Mobaxterm is a Windows application that provides an ssh client, scp client and X11 server all in one program. sshpass doesnt work until you have manually acknowledged adding the ssh key for the remote servers. One thing to note, you'll have to login using ssh from the command line of your admin machine for each server you want to manage. You will have to install sshpass (i know people really hate this package but i was too lazy to get ssh keys going on all the servers) separately which can be downloaded from sourceforge. You'll need cygwin on windows (which is the only place i've tested this). Save this code into a file named copyFileToServers.sh, create a serverlist file that has a list of ips or server names and execute by typeing. I've found it easier than both clusterssh and mtputty. I'm a bash scripting novice so likely not the most efficient or best option but seems to be pretty easy to manage. In addition to using clusterssh or mtputty, a simpile bash script can login to a list of remote servers using ssh, copy a file to each using scp and execute a script on each of the servers. this is my first post here so I cant upload images. You will need to create a folder named temp inside putty main folder and you might need to customize putty logging to save a file per ip or pear session. Putty -ssh -pw paaswd -m commands.txt 192.168.0.22 user_name paaswd Putty -ssh -pw paaswd -m commands.txt 192.168.0.21 user_name paaswd If you want to run the exact command list on every machine then you save it to a file and use another sheet to generate the command-line batch. cmd Command ip user name password Command templateĮcho /snmp set enabled=yes >temp\10.10.0.9.txt| putty -ssh -pw passwd -m temp\10.10.0.9.txt 10.10.0.9 user_name passwd /snmp set enabled=yesĮcho /snmp set enabled=yes >temp\10.10.0.31.txt| putty -ssh -pw passwd2 -m temp\10.10.0.31.txt 10.10.0.31 user_name2 passwd2 /snmp set enabled=yes it works like magic even if you have to customize the command for each server. I used an excel sheet to build cmd commands including putty ssh log-in then copy past the columns in a cmd window. I have recently figure out a way to do this easily.