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:

    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
    root@am335x-evm:~# ifconfig eth0 192.168.1.130
    [1638990.218905] cpsw-switch 4a100000.switch: starting ndev. mode: dual_mac
    [1638990.304989] SMSC LAN8710/LAN8720 4a101000.mdio:00: attached PHY driver (mii_bus:phy_addr=4a101000.mdio:00, irq=POLL)
    root@am335x-evm:~# [1638992.424680] cpsw-switch 4a100000.switch eth0: Link is Up - 100Mbps/Full - flow control off
    [1638992.433375] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
    
    root@am335x-evm:~# ping 192.168.1.100
    PING 192.168.1.100 (192.168.1.100): 56 data bytes
    64 bytes from 192.168.1.100: seq=0 ttl=64 time=1.152 ms
    64 bytes from 192.168.1.100: seq=1 ttl=64 time=0.666 ms
    64 bytes from 192.168.1.100: seq=2 ttl=64 time=0.554 ms
    ^C
    --- 192.168.1.100 ping statistics ---
    3 packets transmitted, 3 packets received, 0% packet loss
    round-trip min/avg/max = 0.554/0.790/1.152 ms
    

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

    :~/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
    The authenticity of host '192.168.1.130 (192.168.1.130)' can't be established.
    RSA key fingerprint is SHA256:lvMxyWj5fn5Krgivdq0LWxNVIUmdRkGjuB0/rDI3Lbs.
    This host key is known by the following other names/addresses:
        ~/.ssh/known_hosts:10: [hashed name]
    Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
    Warning: Permanently added '192.168.1.130' (RSA) to the list of known hosts.
    root@am335x-evm:~#
    root@am335x-evm:~#
    root@am335x-evm:~# uname -a
    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:~#
    

    Regards,

    Nick