SSH Passphrase Dialog Drops to Terminal Passphrase Entry when Canceled - ssh

We're using sshfs to mount a remote directory for a UI program. To kick things off, we launch a system process to set up the mount using sshfs terminal commands. This works well: a dialog pops up asking the user for their passphrase, the mount is created, and all is well.
However, the program is hanging if the user selects "Cancel" in the dialog. Doing this operation through the terminal reveals that when the user cancels the dialog, ssh(fs) drops back to the terminal and prompts for a passphrase entry there. This is invisible to our system call, of course, which is why things hang.
How can I tell ssh(fs) that cancel means cancel? When the UI dialog goes away, I want the command line to simply return.

Related

regain access to centos7 after modify rc.local

I have a centos 7 on a vm. I put some command lines on the rc.local to initialize always the system reboot. I think i did something wrong, because when i restart the system, it frozes and dont enter centos anymore.
The internet is not on, i have to manually connect it when the centos starts, so i can't login the machine through Putty or other ssh program in order to fix the rc.local
What should i do now?
I found out the answer in this video:
www.youtube.com/watch?v=rvPtrwidhwo
When your linux appears to load completely (but get stuck) press "esc" to see where in the list of processes it got stuck.
Restart the virtual machine, and by the time it enters the mode to choose with linux you will want to load (rescue mode or normal mode), press ctrl+e to enter on a configuration/modification screen. It will show commands in the prompt.
You have to add parameters shown on the video. Search for the work "quiet". After this word and before the word LANG, add "systemd.unit=rescue.target"
Press ctrl+x to save (it will restart the vm automatic).
You will enter the rescue mode, input the root password.
Disable or modify the rc.local on (vi /etc/rc.local) in order to regain control over linux.
Then type: shutdown -r.
Restart the vm and everything will work again.

Start vb.net application before windows login

On my server pc I have a simple vb.net application running on windows startup. Currently I simply added it to the StartUp folder in AppData. This works fine except I have to remotely connect and login to my server pc after each restart, before the application will start up. How do i make my application start up with out me having to login first? I know it's possible since a lot of programs dont require you to login on the machine first like teamviewer and my sql server.
You can use Window's Task Scheduler for this purpose:
Basic settings
Open the Task Scheduler (you may search for it in the Start Menu).
In the Actions panel click Create Task....
Enter a name and description (the latter is optional) for your task.
Select Run whether user is logged on or not and possibly Do not store password..
Adding a trigger
Go to the Triggers tab and click New....
In the Begin the task box select At startup.
Make sure Enable is ticked, then press OK.
Specifying an action
Go to the Actions tab and click New....
In the Action box select Start a program.
In the Program/script box enter the path to your application.
Press OK and you're done!
Read more about the Task Scheduler:
Task Scheduler - MSDN
Schedule a Task - TechNet

Commands in PuTTy are unresponsive

I have successfully connected to my server via puTTy and I am entering commands but they are unresponsive. I do not know what is wrong.
If you are using PuTTY, and get an apparently freezed screen, you could have accidentally pressed ctrl + s. This sends an Xoff signal blocking the terminal's output.
The solution is to press ctrl + q to send the Xonsignal.
See also: The GNU screen is unresponsive, seems blocked

Windows 7 Ent login loop

I have a Windows 7 Ent - 64bit system.
I am stuck in a loop, where the login screen is presented, i enter my network credentials, the welcome spinner is shown, the screen flickers like when resized, then the system goes to logging off screen and then finally goes back to the control alt delete screen.
I cannot get out of that loop for the life of me.
I contacted corp support, he came over and logged in using his login (admin level) and was able to get a desktop up.
The support people are not allowed to access the registry to correct or even look at my users settings, and my user IS NOT AN ADMIN on this machine.
Question is - is there a way to blow away my profile on this machine, or reset my registry branch to that of a new user or something???
i have bitlocker enabled on the drive - so using the emergency boot disks are almost rendered useless...
im stuck, and i dont know where to look....
any ideas would be wonderful
thanks
the admin level user logged in, and turned his back for a moment, and i was able to go in and reset the autologon registry entry...
rebooted,and all is well.
Disconnect Your USB Devices
If you like using all sorts of USB devices such as the mouse, keyboard, speakers, Bluetooth speakers, USB dongles, USB Wi-Fi adapters etc. However, these connected devices might cause the Windows 7 stuck on the welcome screen for a long time issue. Therefore, a common solution to the problem is to disconnect all externally connected devices from your PC.
Disconnect from the Internet
Sometimes Windows 10 gets stuck on the login screen because it's trying to connect to your wireless connection. If your Windows gets stuck on the welcome screen, you should make sure that you are not connected to the internet before proceeding to log in.
Run system checks
In some case, corrupt system files on your computer will cause this problem – stuck on welcome screen Windows 10/8/7. Therefore, to fix the Windows 10 freezes on startup problem, you can use CHKDSK to run some checks on your computer to see if it is the corrupted files that cause your startup problem.Restart Windows Update service
You can try restarting Windows Update service and then rename few files if you still get stuck on welcome screen Windows 10 issue.
Here are the steps:
Step 1. Open command prompt.
Step 2. Type net stop wuauserv in the run dialogue and press Enter.
Step 3. Type cd %systemroot% command and press Enter.
Step 4. Type ren SoftwareDistribution SD.old and press Enter.
Step 5. Type net start wuauserv and press Enter.
Step 6. Type exit and press Enter to close Command Prompt and restart your PC.
Step 7. Now, reboot your PC/laptop and check if the stuck on welcome screen has gone.
Restore Windows by using System Restore
System Restore is a useful feature that allows you to restore your operating system to a previous state and fixes any boot problems such as Windows 10 freezes on startup, Windows 7 hangs on welcome screen, etc.

can we execute QTP script on remote machine by keeping session minimized

I have couple of machines on which I wish to schedule exceutions. I need to access these machines remotely for exceution. Whenever I start exceution from these machines and minimize the session my script fails. So just curious to know whether QTP scripts can be executed while keeping sessions minimized. If yes what changes needs to be made in script. Thanks.
When you minimize this window, the operating system switches the remote session to a GUI-less mode and does not display windows and controls. As a result, the tests are unable to interact with the tested application’s GUI as the GUI doesn’t actually exist in this case.
You need to change Registry keys on your computer (that is, the computer from which you connect to a remote QTP workstation). Here is a step-by-step description:
Close Remote Desktop sessions opened on your computer.
Click Start and select Run. In the Run dialog box, type regedit and press Enter. Registry Editor starts
Locate any of the following Registry keys:
HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\
(if you want to change the RDC settings for your user account)
-- or --
HKEY_LOCAL_MACHINE\Software\Microsoft\Terminal Server Client\
(if you want to change the RDC settings for all accounts)
Create a new DWORD value in this key named RemoteDesktop_SuppressWhenMinimized. Specify 2 as the value data.
That’s all. Now minimizing the Remote Desktop Connection window on your computer will not affect the remote computer’s GUI and the GUI will still be available to your automated GUI tests.
This was taken from: http://blog.smartbear.com/post/10-10-11/testcomplete-tip-running-tests-in-minimized-remote-desktop-windows/
The problem you're facing is that if you minimize your display the remove machine knows that it doesn't have a display and ignores any questions about control locations and requests to move the mouse. In some cases QTP runs tests using device replay which means that the test will fail.
To work around this you need to have the remote machine think that it still has someone attached to it. One way is (obviously) to not minimize or close the remote desktop session. Another way is to use a remote access program that doesn't inform the remote machine when it's minimized a free example of such program is VNC, if I remember correctly you can even close the VNC session (not just minimize it) and the test will still run successfully.