Cygwin sshd use cmd instead of bash upon login via PuTTY [closed] - windows

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I've finally got to the point where I can successfully SSH into my server, but commands like 'rake' and 'bundle' don't work! I'd rather be taken to cmd than bash upon login. Is there a command I can put into PuTTY's "Remote Command" box so that cmd gets loaded? I tried "-c cmd" but it just closes upon a successful connection. If I leave it out and just type 'cmd' when the bash prompt is ready it works ok. Also another thing of note is that user environment variables in Windows don't get transferred to the SSH session (like GIT_SSH).

Nothing was working, but I came across something which sort of made sense when browsing the passwd file for another problem I was having. The last part of the line indicates what is executed upon login. Originally it was /bin/bash, so I changed it to the cmd executable and it works now.
ex)
Administrator:unused:[SID-STUFF]:U-POS-SERVER\Administrator,[SID-HERE]:/cygdrive/c/Users/Administrator:/cygdrive/c/windows/system32/cmd

Related

I can't run an exe file completely hidden [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I tried to run a program called MSIAfterburner with no windows
But nothing works
I tried
Quiet.exe
Nircmd.exe
I tried some python scripts and JavaScript & Powershell and VBS. And every time it was showing the window of the program
Can somebody help me?
Neither quiet.exe nor nircmd.exe come with windows by default. I believe this MSIAfterburner program you are referring to is a graphics overclocking utility, which is a windows application, as opposed to a console application.
Therefore, if you for whatever reason want to run it without a window, the easiest way I can think of would be to launch the program in a different session using psexec -i 0 (run it as admin) from here.
If you want to run it without a window without admin privileges, the best I can think of would be to use the winapi ShowWindow(handle_to_the_app_main_window, SW_HIDE).

how to run a server in one terminal and open another terminal and run the client using bash scripting? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
i use ubuntu 20.04,using bash shell scripting i want to run the server in one terminal and open another terminal and run the client.I tried by using gnome-terminal it doesnt solve the problem.
#!/bin/bash
cd clustermanagement
go run server/main.go
gnome-terminal -x sh -c "go run client/main.go;bash"
i tried with other commands like gnome-terminal --bash -c "go run client/main.go; bash"
it didn't work.
the server starts running and then if press Ctrl+c and stop the server then only the client is running.
i want server to run and automatically a new terminal should be opened and client should run!
why not try running the server in the background using '&'
EDIT: looks like #Marc got to it first.

The current directory is invalid on Windows 8 [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I've been trying to run the following command through command prompt as administrator
netstat -a -b
However I get the following error
The current directory is invalid.
I tried to follow http://support.microsoft.com/kb/257996 but I don't think mine has anything to do with Logon Scripts
UPDATE
Running netstat -a as normal user through command prompt works fine. However I need to know which process ID using -b option which requires elevation.
I tried the same command "netstat -a -b" WITH ADMINISTRATIVE PRIVILEGES
There isnt any issue at all.
Here is your Problem:
Like any other program netstat.exe is also a program which is located on the windows directory
Browse to C:\Windows\system32> and then type so you should face the program locational issue.
If you are unsure whether c: or d: is the windows root directory.
1.Open the cmd file with Admin Previleges
2.type "cd %windir%\system32"
3.The above step should automatically switch to your root win folder

Detach running programe from bash [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I'm often in the situation that I run a linux task but then I have to leave the computer or shutdown the notebook, and the task I ran from putty has not finished yet.
Is there a way of I can quit putty and leave the process running 'til it's finished?
I know I can use screen etc, but now I already started the command w/o screen.
(please don't bother too much I didnt directly ask on superuser, serverfault or unix SO.)
Press Ctrl-Z to put the command to background.
Run bg to run it from being suspended.
Then run disown to disown the process from the parent.
It actually also depends on how your command works. Some command exits when it loses its terminal. If that's the case, you can really only just run it with screen or use nohup command </dev/null >/dev/null 2>&1 &.
One way to run it with screen could be screen -dm command.

Cygwin Terminal: FTP Connection (Password Input doesn't end) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I'm using Cygwin shell to try to establish a TCP connection with a specific IP address.
After typing "ftp 'the ip address'"
I get prompted for the username/password.
When I enter the username and press enter, it prompts me for the password (as I expected).
However, when I input the password and press enter, it just jumps to the next line and acts as if the buffer is still waiting for more input. It keeps doing this, leading me to have to use Ctrl-C to get out of it.
Anyone know any possible issues? This is for a school project. One of the TA's says this is "expected behavior" ... however, I couldn't find anything on the internet about this issue.
You're probably running the ftp command that comes with Windows, which doesn't work correctly in a Cygwin terminal. You can install the inetutils package to get Cygwin's own ftp client.

Resources