I tried running the command you mentioned over SSH and it looked like it worked fine:
ubuntu@box123:~$ echo no | android create avd -n testAVD -f -t android-23 --abi default/armeabi-v7a
Android 6.0 is a basic Android platform.
Do you wish to create a custom hardware profile [no]Created AVD 'testAVD' based on Android 6.0, ARM (armeabi-v7a) processor,
with the following hardware config:
hw.cpu.model=cortex-a8
hw.lcd.density=240
hw.ramSize=512
vm.heapSize=48
Are you sure this is the command that is causing the error? Can you try adding the set -x debug flag to your script?