I've been using SSH on both Windows and Linux for a long time to get remote access to various machines, and to tunnel TCP connections through firewalls.
On windows, this has generally meant installing Cygwin's SSHD server, which gives you the cygwin Bash shell.
While I'm comfortable in a unix environment, when I log into a windows box I generally prefer to see a shell that looks like a standard windows command line, e.g. I generally don't want the slashes going the wrong way, and I don't want the whole windows filesystem visible a few levels too deep (/cygdrive/c/ for example )
I knew about the http://sshwindows.sourceforge.net/ project, but it has not been active for a long time (although It does now look active again). And I dont want to have to install something new, when I already have a working SSHD server on many machines. There's also WinSSHD, but that is not free.
I just discovered, by editing /etc/passwd I can make my existing cygwin SSHD installations give me a CMD.exe prompt instead of a Bash shell.
All I had to do was find the line corresponding to my user, and edit the end of the line, changing '/bin/bash' to '/cygdrive/c/WINDOWS/system32/cmd.exe'
And thats it!
Unfortunately, this stops SCP working. I do know the above OpenSSH for Windows project does not have this problem by using the 'switch.exe' program, but I dont see that included with a standard cygwin installation.
To get around this issue, I just created another user, same as the my first, but with the original '/bin/bash' shell configured instead of cmd.exe. I log in with this user when I need SCP.
Update: It doesn't like tab file completion, Ctrl-C is killing putty instead of the remote application, and I forgot how important 'vim' is in these remote terminals... so I'm switching back to the default bash shell. I can always just start cmd.exe when inside bash...
Showing posts with label cygwin unix ssh windows. Show all posts
Showing posts with label cygwin unix ssh windows. Show all posts
Tuesday, October 13, 2009
Subscribe to:
Comments (Atom)
