Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Bash script waiting for input
New Posts  All Forums:Forum Nav:

Bash script waiting for input

post #1 of 2
Thread Starter 
Hi, I have couple places I need to ssh into twice that usually go something like this.
Code:
ssh username@address1
Enter password
Use Yubikey
ssh username@address2

address2 can be different depend on the server I want to ssh into.
So I was thinking I write a bash script for each of the server but I am not sure if I can use it since I will need to enter password and yubikey.

Thank you.
post #2 of 2
The login should be done with ssh key-pairs, but you can also use "except"
http://stackoverflow.com/questions/13298487/bash-script-to-ssh-into-a-machine-without-prompting-password-and-without-using-k
http://stackoverflow.com/questions/16928004/how-to-enter-ssh-password-using-bash
Core I7
(13 items)
 
  
CPUMotherboardGraphicsRAM
I7 920 rev. D0 @ 4.26Ghz EVGA X58 SLI EVGA GTX 285 OCZ XMP 3x2Gb (pc3 12800) 
Hard DriveOptical DriveOSMonitor
Western Digital Caviar Black 640Gb x 2 LG GH22LS30 openSuse 12.1 x64 HP F2105 
PowerCase
CORSAIR 850TX Cooler Master ATCS 840 
  hide details  
Reply
Core I7
(13 items)
 
  
CPUMotherboardGraphicsRAM
I7 920 rev. D0 @ 4.26Ghz EVGA X58 SLI EVGA GTX 285 OCZ XMP 3x2Gb (pc3 12800) 
Hard DriveOptical DriveOSMonitor
Western Digital Caviar Black 640Gb x 2 LG GH22LS30 openSuse 12.1 x64 HP F2105 
PowerCase
CORSAIR 850TX Cooler Master ATCS 840 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Bash script waiting for input