This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PROCESSOR-SDK-AM335X: Unable to connect target from host using ssh

Part Number: PROCESSOR-SDK-AM335X

Hi ,

I am using am335x and want to connect the target on my pc using ssh but there is error coming:

root@ti-OptiPlex-9020:/home# ssh root@192.168.2.20
ssh: connect to host 192.168.2.20 port 22: Connection refused
root@ti-OptiPlex-9020:/home# ssh root@192.168.2.20/22
ssh: Could not resolve hostname 192.168.2.20/22: Name or service not known

  • Hello Himanshu,

    Please note that you are asking a generic Linux question here, not a question that is specific to TI hardware or TI software (How to I connect to a Linux processor over SSH?). We can only support questions about TI hardware or TI software on the TI forums.

    I'll give you a quick demo of how I do it on my computer, but if you have followup questions you are going to have to look for support somewhere else.

    On AM335x beaglebone black I set my IP address:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    Linux am335x-evm 6.1.46-g1d4b5da681 #1 PREEMPT Thu Oct 19 10:19:08 UTC 2023 armv7l armv7l armv7l GNU/Linux
    root@am335x-evm:~# ifconfig
    eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
    inet6 fe80::3ad2:69ff:fe7c:8ef5 prefixlen 64 scopeid 0x20<link>
    ether 38:d2:69:7c:8e:f5 txqueuelen 1000 (Ethernet)
    RX packets 108959 bytes 29212444 (27.8 MiB)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 26092 bytes 8588596 (8.1 MiB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
    lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
    inet 127.0.0.1 netmask 255.0.0.0
    inet6 ::1 prefixlen 128 scopeid 0x10<host>
    loop txqueuelen 1000 (Local Loopback)
    RX packets 96 bytes 7974 (7.7 KiB)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 96 bytes 7974 (7.7 KiB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
    root@am335x-evm:~# ifconfig eth0 down
    [1638982.800996] cpsw-switch 4a100000.switch eth0: Link is Down
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    on my computer (which has IP address 192.168.1.100) I try to ssh in:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    :~/ti$ ssh root@192.168.1.130
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
    Someone could be eavesdropping on you right now (man-in-the-middle attack)!
    It is also possible that a host key has just been changed.
    The fingerprint for the RSA key sent by the remote host is
    SHA256:lvMxyWj5fn5Krgivdq0LWxNVIUmdRkGjuB0/rDI3Lbs.
    Please contact your system administrator.
    Add correct host key in /home/<USER>/.ssh/known_hosts to get rid of this message.
    Offending RSA key in /home/<USR>/.ssh/known_hosts:6
    remove with:
    ssh-keygen -f "/home/<USER>/.ssh/known_hosts" -R "192.168.1.130"
    Host key for 192.168.1.130 has changed and you have requested strict checking.
    Host key verification failed.
    :~/ti$ ssh-keygen -f "/home/<USER>/.ssh/known_hosts" -R "192.168.1.130"
    # Host 192.168.1.130 found: line 6
    /home/<USER>/.ssh/known_hosts updated.
    Original contents retained as /home/<USER>/.ssh/known_hosts.old
    :~/ti$ ssh root@192.168.1.130
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Regards,

    Nick