linux - Cannot connect to host by SSH -


cannot connect host ssh.

i using following shell script use ssh.

host_list="c15-0330-14.ad.mtu.edu" ssh "$host_list" 

but says : name or service not knownname c15-0330-14.ad.mtu.edu.

i tried ssh c15-0330-14.ad.mtu.edu. works. also, if have several hosts, how can invoke them 1 one?

the error message should be

ssh: not resolve hostname c15-0330-14.ad.mtu.edu: name or service not known 

except dos line endings in script cause carriage return stored @ end of value of host_list. carriage return, when printed part of error message, causes cursor return beginning of line, resulting in error message see. notice how 2 halves line (the carriage return precedes colon):

ssh: not resolve hostname c15-0330-14.ad.mtu.edu : name or service not known 

results in error of

: name or service not knownname c15-0330-14.ad.mtu.edu 

Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -