Estou usando uma tarefa do Conemu para ssh no meu servidor. A fim de ter 256 cores para o meu suporte a gerador motd eu coloquei o conector cygwin conemu-cyg-64.exe na pasta bin da minha instalação CygWin no meu desktop e meu laptop. ( link )
Na minha área de trabalho, a seguinte tarefa funciona perfeitamente:
conemu-cyg-64.exe -cur_console:h0 ssh [email protected]
No meu laptop, usando o mesmo comando e a mesma configuração, recebo este erro:
Pseudo-terminal will not be allocated because stdin is not a terminal
Eu tentei muitas coisas, como reinstalar o CygWin completamente, alterando a versão do openssh. Eu tentei com a versão 7.1p1-1 e versão 6.9p1-1. Tudo que eu tentei deu o mesmo erro, exceto quando eu uso o comando ssh com o parâmetro -tt.
conemu-cyg-64.exe -cur_console:h0 ssh -tt [email protected]
Mas isso causa outros problemas, pois a conclusão da tabulação parece não funcionar mais quando o uso de -tt e também a seta fornecem OA OC OB OD como resultado.
Ao usar um conector em branco
conemu-cyg-64.exe -cur_console:h0
sem o comando ssh:
ssh -V
OpenSSH_7.1p1, OpenSSL 1.0.2e 3 Dec 2015
which ssh
/usr/bin/ssh
A configuração é exatamente igual à da minha área de trabalho, onde a primeira tarefa da pergunta funciona perfeitamente. Quando eu abro a tarefa 'conemu-cyg-64.exe -cur_console: h0' e depois cole 'ssh [email protected]' funciona.
Qualquer idéia ou dicas para solucionar isso para que funcione com o ssh na tarefa são bem-vindas.
Do Cmd (cmd.exe / k "% ConEmuBaseDir% \ CmdInit.cmd") na área de trabalho:
> conemu-cyg-64.exe --verbose ssh [email protected]
{PID:19148} declaring TERM: 'xterm-256color' (was: 'cygwin')
{PID:19148} current $HOME is '/cygdrive/c/Users/Willem'
{PID:19148} 0: isatty()=1; pgrp=19148; ttyname()='/dev/cons0'
{PID:19148} 1: isatty()=1; pgrp=19148; ttyname()='/dev/cons0'
{PID:19148} 2: isatty()=1; pgrp=19148; ttyname()='/dev/cons0'
{PID:19148} calling fork (pgid=19148)
{PID:19148} child pid=23540 pgid=19148 was created (ourpgid=19148)
{PID:19148} PTY was created: '/dev/pty0'; Child PID:23540
{PID:19148} 0: isatty()=1; pgrp=19148; ttyname()='/dev/cons0'
{PID:19148} 1: isatty()=1; pgrp=19148; ttyname()='/dev/cons0'
{PID:19148} 2: isatty()=1; pgrp=19148; ttyname()='/dev/cons0'
{PID:19148} raising SIGUSR1 in pid=23540
{PID:19148} SIGUSR1 received
{PID:23540} child created (pgid=23540)
{PID:23540} child process wating for SIGUSR1 (pgid=23540)
{PID:23540} SIGUSR1 received
{PID:23540} child process continues after 0 ms (SIGUSR1=1)
{PID:23540} ttyname(1)='/dev/pty0'
{PID:23540} ttyname(1)='/dev/pty0'
{PID:23540} 0: isatty()=1; pgrp=23540; ttyname()='/dev/pty0'
{PID:23540} 1: isatty()=1; pgrp=23540; ttyname()='/dev/pty0'
{PID:23540} 2: isatty()=1; pgrp=23540; ttyname()='/dev/pty0'
{PID:23540} raising SIGUSR1 in pid=19148
{PID:23540} shell: 'ssh' '[email protected]'
{PID:23540} dir: '/cygdrive/c/Users/Willem'
Last login: Thu Jan 7 18:56:29 2016 from 78-21-31-4.access.telenet.be
Na minha área de trabalho:
eco $ TERM
xterm-256color
No laptop:
$ conemu-cyg-64.exe --verbose ssh [email protected]
{PID:13184} declaring TERM: 'xterm-256color' (was: 'cygwin')
{PID:13184} current $HOME is '/cygdrive/c/Users/willem/'
{PID:13184} 0: isatty()=1; pgrp=13184; ttyname()='/dev/cons0'
{PID:13184} 1: isatty()=1; pgrp=13184; ttyname()='/dev/cons0'
{PID:13184} 2: isatty()=1; pgrp=13184; ttyname()='/dev/cons0'
{PID:13184} calling fork (pgid=13184)
{PID:13184} child pid=8680 pgid=13184 was created (ourpgid=13184)
{PID:13184} PTY was created: '/dev/pty0'; Child PID:8680
{PID:13184} 0: isatty()=1; pgrp=13184; ttyname()='/dev/cons0'
{PID:13184} 1: isatty()=1; pgrp=13184; ttyname()='/dev/cons0'
{PID:13184} 2: isatty()=1; pgrp=13184; ttyname()='/dev/cons0'
{PID:13184} raising SIGUSR1 in pid=8680
{PID:13184} SIGUSR1 received
{PID:8680} child created (pgid=8680)
{PID:8680} child process wating for SIGUSR1 (pgid=8680)
{PID:8680} SIGUSR1 received
{PID:8680} child process continues after 16 ms (SIGUSR1=1)
{PID:8680} ttyname(1)='/dev/pty0'
{PID:8680} ttyname(1)='/dev/pty0'
{PID:8680} 0: isatty()=1; pgrp=8680; ttyname()='/dev/pty0'
{PID:8680} 1: isatty()=1; pgrp=8680; ttyname()='/dev/pty0'
{PID:8680} 2: isatty()=1; pgrp=8680; ttyname()='/dev/pty0'
{PID:8680} raising SIGUSR1 in pid=13184
{PID:8680} shell: 'ssh' '[email protected]'
{PID:8680} dir: '/cygdrive/c/Users/willem'
Pseudo-terminal will not be allocated because stdin is not a terminal.
pwd
/home/user
echo $TERM
pwd
/home/user
/ usr / bin / sh -c "conjunto" no laptop:
$ conemu-cyg-64.exe --verbose --shlvl /usr/bin/sh -c "set"
{PID:5788} declaring TERM: 'xterm-256color' (was: 'cygwin')
{PID:5788} current $HOME is '/cygdrive/c/Users/willem/'
{PID:5788} 0: isatty()=1; pgrp=5788; ttyname()='/dev/cons0'
{PID:5788} 1: isatty()=1; pgrp=5788; ttyname()='/dev/cons0'
{PID:5788} 2: isatty()=1; pgrp=5788; ttyname()='/dev/cons0'
{PID:5788} calling fork (pgid=5788)
{PID:5788} child pid=19116 pgid=5788 was created (ourpgid=5788)
{PID:5788} PTY was created: '/dev/pty0'; Child PID:19116
{PID:5788} 0: isatty()=1; pgrp=5788; ttyname()='/dev/cons0'
{PID:5788} 1: isatty()=1; pgrp=5788; ttyname()='/dev/cons0'
{PID:5788} 2: isatty()=1; pgrp=5788; ttyname()='/dev/cons0'
{PID:5788} raising SIGUSR1 in pid=19116
{PID:19116} child created (pgid=19116)
{PID:19116} child process wating for SIGUSR1 (pgid=19116)
{PID:19116} SIGUSR1 received
{PID:19116} child process continues after 15 ms (SIGUSR1=1)
{PID:19116} ttyname(1)='/dev/pty0'
{PID:19116} ttyname(1)='/dev/pty0'
{PID:19116} 0: isatty()=1; pgrp=19116; ttyname()='/dev/pty0'
{PID:19116} 1: isatty()=1; pgrp=19116; ttyname()='/dev/pty0'
{PID:19116} 2: isatty()=1; pgrp=19116; ttyname()='/dev/pty0'
{PID:19116} raising SIGUSR1 in pid=5788
{PID:19116} shell: '/usr/bin/sh' '-c' 'set'
{PID:19116} dir: '/cygdrive/c/Users/willem'
{PID:5788} SIGUSR1 received
ALLUSERSPROFILE='C:\ProgramData'
ANSICON='118x4000 (118x28)'
ANSICON_DEF=7
APPDATA='C:\Users\willem\AppData\Roaming'
BASH=/usr/bin/sh
BASHOPTS=cmdhist:complete_fullquote:extquote:force_fignore:hostcomplete:interactive_comments:progcomp:promptvars:sourcepath
BASH_ALIASES=()
BASH_ARGC=()
BASH_ARGV=()
BASH_CMDS=()
BASH_EXECUTION_STRING=set
BASH_LINENO=()
BASH_SOURCE=()
BASH_VERSINFO=([0]="4" [1]="3" [2]="42" [3]="4" [4]="release" [5]="x86_64-unknown-cygwin")
BASH_VERSION='4.3.42(4)-release'
COMMONPROGRAMFILES='C:\Program Files\Common Files'
COMPUTERNAME=NBDIG50009
COMSPEC='C:\Windows\system32\cmd.exe'
ChocolateyBinRoot='\bin'
ChocolateyInstall='C:\ProgramData\chocolatey'
CommonProgramW6432='C:\Program Files\Common Files'
ConEmuANSI=ON
ConEmuAnsiLog=
ConEmuArgs=
ConEmuBackHWND=0x000D1506
ConEmuBaseDir='C:\Users\willem\Dropbox\Utilities\ConEmu\ConEmu'
ConEmuBuild=151224
ConEmuConfig=
ConEmuDir='C:\Users\willem\Dropbox\Utilities\ConEmu'
ConEmuDrawHWND=0x000A0C8C
ConEmuDrive=C:
ConEmuHWND=0x0040183C
ConEmuHooks=Enabled
ConEmuIsAdmin=ADMIN
ConEmuPID=14444
ConEmuPrompt0='$E[32m$E]9;8;"USERNAME"$E\@$E]9;8;"COMPUTERNAME"$E\$S'
ConEmuPrompt1='$E[32m$E]9;8;"USERNAME"$E\@$E]9;8;"COMPUTERNAME"$E\$S$E[92m$P$E[90m'
ConEmuPrompt2='$_$E[90m$$'
ConEmuPrompt3='$E[m$S'
ConEmuServerPID=12516
ConEmuWorkDir='C:\Users\willem'
ConEmuWorkDrive=C:
DEFLOGDIR='C:\ProgramData\McAfee\DesktopProtection'
DIRSTACK=()
EUID=1077902
FP_NO_HOST_CHECK=NO
GROUPS=()
HOME=/cygdrive/c/Users/willem/
HOMEDRIVE=H:
HOMEPATH='\'
HOMESHARE='\userdrive\home'
HOSTNAME=NBDIG50009
HOSTTYPE=x86_64
IFS='
'
LOCALAPPDATA='C:\Users\willem\AppData\Local'
LOGONSERVER='\DC01'
MACHTYPE=x86_64-unknown-cygwin
NUMBER_OF_PROCESSORS=4
OPTERR=1
OPTIND=1
OS=Windows_NT
OSTYPE=cygwin
PATH='/cygdrive/c/Users/willem/Dropbox/Utilities/ConEmu/ConEmu/Scripts:/cygdrive/c/Users/willem/Dropbox/Utilities/ConEmu:/cygdrive/c/Users/willem/Dropbox/Utilities/ConEmu/ConEmu:/cygdrive/c/Perl64/site/bin:/cygdrive/c/Perl64/bin:/cygdrive/c/ProgramData/Oracle/Java/javapath:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/ProgramData/chocolatey/bin:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files/Microsoft SQL Server/110/Tools/Binn:/cygdrive/c/Program Files (x86)/Microsoft SDKs/TypeScript/1.0:/cygdrive/c/Program Files/Microsoft SQL Server/120/Tools/Binn:/cygdrive/c/Program Files (x86)/Git/cmd:/cygdrive/c/Program Files (x86)/Git/bin:/cygdrive/c/Program Files (x86)/Microsoft SQL Server/110/Tools/Binn/ManagementStudio:/cygdrive/c/Program Files (x86)/Microsoft SQL Server/110/Tools/Binn:/cygdrive/c/Program Files (x86)/Microsoft SQL Server/110/DTS/Binn:/cygdrive/c/Program Files/TortoiseHg:/cygdrive/c/Program Files/SourceGear/Common/DiffMerge:/cygdrive/c/Program Files (x86)/Skype/Phone:/usr/bin:/cygdrive/c/Users/willem/AppData/Local/atom/bin:/cygdrive/c/Users/willem/AppData/Local/atom/bin:/cygdrive/c/tools/cmder:/cygdrive/c/Program Files/Boot2Docker for Windows'
PATHEXT='.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC'
POSIXLY_CORRECT=y
PPID=5788
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER='Intel64 Family 6 Model 60 Stepping 3, GenuineIntel'
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=3c03
PROGRAMFILES='C:\Program Files'
PROMPT='$E[32m$E]9;8;"USERNAME"$E\@$E]9;8;"COMPUTERNAME"$E\$S$E[92m$P$E[90m$_$E[90m$$$E[m$S'
PS4='+ '
PSModulePath='C:\Users\willem\Documents\WindowsPowerShell\Modules'
PUBLIC='C:\Users\Public'
PWD=/cygdrive/c/Users/willem
ProgramData='C:\ProgramData'
ProgramW6432='C:\Program Files'
SHELL=/bin/bash
SHELLOPTS=braceexpand:hashall:interactive-comments:posix
SHLVL=2
SYSTEMDRIVE=C:
SYSTEMROOT='C:\Windows'
TEMP=/cygdrive/c/Users/willem/AppData/Local/Temp
TERM=xterm-256color
TMP=/cygdrive/c/Users/willem/AppData/Local/Temp
UID=1077902
USERDNSDOMAIN=DOMAIN
USERDOMAIN=DOMAIN
USERDOMAIN_ROAMINGPROFILE=DOMAIN
USERNAME=willem
USERPROFILE='C:\Users\willem'
VBOX_MSI_INSTALL_PATH='C:\Program Files\Oracle\VirtualBox\'
VS120COMNTOOLS='C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\'
VSEDEFLOGDIR='C:\ProgramData\McAfee\DesktopProtection'
WINDIR='C:\Windows'
WIX='C:\Program Files (x86)\WiX Toolset v4.0\'
_=/usr/bin/sh
chocolatey_bin_root='\bin'
windows_tracing_flags=3
windows_tracing_logfile='C:\BVTBin\Tests\installpackage\csilogfile.log'
{PID:5788} read(3) failed (5): Input/output error
{PID:5788} pty_fd set to -1
{PID:5788} pid=19116 was terminated, exitcode=0
{PID:5788} Stopping our threads
{PID:5788} normal exit from main
Sua última sugestão me colocou na direção certa. O Process Explorer mostra que o ssh.exe em C: \ Arquivos de Programas (x86) \ Git \ bin é usado
Imagem do explorador de processos mostrando o ssh.exe no Git
Como Maximus sugere em sua resposta usando / usr / bin / ssh em minhas tarefas resolve o problema!