Tue Jul 31, 2012 3:26 pm
Hi guys,
I've got the same issue. If there's no allocated terminal, SSH server seems not to run command, or not to return it's output.
It does not seem to exist up to 5.16 (included), but exists in 5.18 and 5.19. I have not checked 5.17.
There's no difference between key-auth and password-auth.
Analogous case works if ssh-server is run on non-RouterOS system (freebsd to be exact), so this is not an ssh-client issue.
172.16.6.145 has RouterOS 5.19 and 172.16.5.223 has 5.16.
This two work perfectly as the should:
[] #ssh -i /root/.ssh/backup_id_dsa admin@172.16.6.145 '/system identity print'
name: XXXXX
[] #ssh -i /root/.ssh/backup_id_dsa admin@172.16.5.223 '/system identity print;' name: XXXXX
[] #echo "/system identity print" |ssh -i /root/.ssh/backup_id_dsa admin@172.16.5.225
Pseudo-terminal will not be allocated because stdin is not a terminal.
名称:“XXXXX”
#
and these do not (first four are quite the same):
[] #ssh -i /root/.ssh/backup_id_dsa admin@172.16.6.145 '/system identity print' [] #ssh -i /root/.ssh/backup_id_dsa admin@172.16.6.145 '/system identity print;' [] #ssh -i /root/.ssh/backup_id_dsa admin@172.16.6.145 'system identity print' [] #ssh -i /root/.ssh/backup_id_dsa admin@172.16.6.145 system identity print [] #echo "/system identity print" |ssh -i /root/.ssh/backup_id_dsa admin@172.16.6.145
Pseudo-terminal will not be allocated because stdin is not a terminal.
[] #
ssh client:
[] #ssh -V
OpenSSH_5.8p2 FreeBSD-openssh-portable-5.8.p2_2,1, OpenSSL 0.9.8e 23 Feb 2007
Routerboard having the issue:
[admin@Mikrotik] > /ip address print
Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK INTERFACE
0 ;;; default configuration
172.16.6.145/24 172.16.6.0 bridge1
[admin@Mikrotik] > /system resource print
uptime: 8m30s
version: 5.19
free-memory: 49204KiB
total-memory: 62184KiB
cpu: MIPS 24Kc V7.4
cpu-count: 1
cpu-frequency: 300MHz
cpu-load: 2%
free-hdd-space: 89432KiB
total-hdd-space: 126976KiB
write-sect-since-reboot: 199
write-sect-total: 73058
bad-blocks: 0%
architecture-name: mipsbe
board-name: RB433
platform: MikroTik
[admin@Mikrotik] > /system routerboard print
routerboard: yes
model: 433
serial-number: XXXXXXXXXXXX
current-firmware: 2.41
upgrade-firmware: 2.41
[admin@Mikrotik] > /ip ssh print
forwarding-enabled: no
always-allow-password-login: yes
Best regards,
Bartlomiej Korupczynski