***** METHOD 1 *********
Do ifconfig in tx2 and get the ip adrress from eg. inet 192.168.43.179
Now connect via ssh when you are connected with same network
ssh -X nvidia@193.0.0.106
***** METHOD 2 ********
got to Settings > Sharing > turn on Remote login
ssh rajesh@rajesh-tx2.local
Issue 1: man in middle attack error
if man in middle attack error is coming remove all the previous host info by cleaning this file
vim /Users/sumityadav/.ssh/known_hosts
Issue 2: ssh_exchange_identification: read: Connection reset by peer
The way I solved the problem is I went to the host machine and ran a few commands.
sudo mkdir /var/run/sshd
sudo chmod 755 -R /var/run/sshd
sudo service ssh restart
I got connected to the machine after that.