i am trying to connect to unix server from windows bat file using telnet command. But bat file is unable to pass username and password hence could not login to UNIX.
My requirement is to connect UNIX server from .bat file and run few macros at a perticular schedule. My UNIX login does not have the access to use crontab hence i am going for windows bat files.
I googled a lot to get the answer for - how to connect UNIX from windows bat file but not getting any proper answer.
We could be more specific if you state which version of Windows and which version of unix.
The general solution is to use Windows "rsh" which is specifically for running unix commands on a unix server from a Windows command prompt (or Windows Batch File). Check with your Network Administrator whether remote shell is allowed in your security policy.
You will find many methods described on the Internet to get Windows rsh to work. Here is the simplest.
1) Choose a user on the unix server "unixserver" to host the commands. "unixuser".
Do not use "root" because this is inherantly insecure.
2) Note the username you use to log into you PC. "dosuser".
3) Create (or add to) a .netrc file in the home directory of "unixuser" with permissions 600 owned by "unixuser" and containing:
On some systems where we have IP address above it has to be fully qualified host name which you can find out by issuing "who -R am i" from a telnet session from the same PC.
4) Test rsh from the Windows command prompt. For example run unix command "pwd".
Interestingly the obvious command to try is "who am i" but this will not work because "rsh" does not have a terminal context.
The command to be executed from rsh could be a shell script containing thousands of commands.
Hello All ,
Requiremnt : i want to login to putty automatically and change the settings like i want , for ex : changing the "lines of scrollback" , " under colors , want to check to checkmark the option use system colors" . Like this i want to do .
I have a bash file created to login . But... (2 Replies)
Hi,
While trying to supress password prompt using ssh. I have added .ssh folder manually and generated public key and added to authorized_keys file in the remote machine. But still it's prompting for passwords with the following message:
Permission denied... (5 Replies)
Hi,
I looked into lot of posts on this question but i could not figure out the solution. we are using the following ftp shell program to send the file to target server.
#!/usr/bin/ksh
ftp -n -i<<EOF 2>&1
open <target server ip>
user <username> <pwd>
lcd /sc/doc/prd/FCSTP
put file1.txt... (3 Replies)
Hi All,
How do you get around SFTP not having the 'cat' command to set up scripts to run cron jobs for passwords?
I am use to the FTP allowing that, but we are converting to SFTP and need to be able to still run the same scripts in off hrs. Is there a way to still cat the password at the prompt... (14 Replies)
Hi All,
We have some HP unix servers and sometimes we logon there thru a dedicated Windows server that has Reflection X on it in case we need X. In this case we always need to export DISPLAY=winservername:0.0
I want to automate this thing in .profile file. If e.g. $TERM = hpterm (thru... (2 Replies)
I am trying to bypass the login screen when the system boots and auto-login to open windows. I believe I need to modify the S99dtlogin but I don't know what to add/modify. Has anyone ever created an auto-login for Solaris 8? (1 Reply)
I am trying to bypass the login screen when the system boots and auto-login to open windows. I believe I need to modify the S99dtlogin but I don't know what to add/modify. Has anyone ever created an auto-login for Solaris 8? (1 Reply)
Hey all,
I'm trying to configure a system so when it reboots it'll automatically log as a user I have selected. I've never done this nor' as I to sure on how to. This is teh best I have found on teh web and well I've changed a few things. but does anyone who has done this know if it'll work... (1 Reply)
Ok I've lost myself and hit a brick wall.
What I am trying to do is avoid the login screen when the machine is turned on. So no login screen is needed unless you turn the machine on and log out to login and change users. But as I said before I've hit a brick wall. I got not an idea of what I... (4 Replies)