简体   繁体   中英

Unable to connect to a desktop in same network but different domain

I can connect to a PC in the same domain as mine using paramiko client. Cygwin server is running on the remote PC.

 ssh.connect('135.24.237.170',username = 'cyg_server',password = 'force')

This PC 135.24.237.170 is in a domain named 'lsi-PC' which is same as my laptop.

But, for another PC '135.24.237.190' which is in my network but in a different domain (Domain name is Admin-PC) what should be the code to connect to it? Though cygwin is successfully installed and SSHD is running but still when I connect and try to execute a command it fails. I believe its happening because it is in a different domain.

For the PC in the other domain running ssh daemon, have you tried exporting your domain users and groups?

Another clue that you need to export is if you get a message like:

Your group is currently "mkpasswd". This indicates that the /etc/passwd (and possibly /etc/group) files should be rebuilt. See the man pages for mkpasswd and mkgroup then, for example, run mkpasswd -l [-d] > /etc/passwd mkgroup -l [-d] > /etc/group Note that the -d switch is necessary for domain users. To export domain users:

$ mkpasswd -d >> /etc/passwd To export groups:

$ mkgroup > /etc/group

https://benbiddington.wordpress.com/2010/08/04/ssh-cygwin-and-domain-users/

Also mentioned here: "Setting up a Cygwin OpenSSH Server for Windows Domains on a TADDM Gateway Server"

Then you can try SSHing to the computer in the other domain with a username that looks like DOMAIN_username

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM