Logging to Adobe CQ5 using PuTTY - putty

I would like to learn about connecting to the CQ5 server using Putty SSH/telnet client for windows to perform operations like server start/stop, check status etc
I tried connecting, but got connection refused.
If anyone could help with the steps to connect, it would be useful.
Thanks,
Sriram

This is not CQ5 related!
If the server you are trying to connect to is not offering ssh access you won't be able to connect this way. Maybe you are trying to connect to a windows-server? Try remote-desktop in this case.

The below is the Example that might be useful when you are using a putty client from windows, and the CQ5 is hosted in the Linux box.
open the putty window, provide the details
1)HostName or (Ip Address)
Example: 192.168.1.1
2) Enable SSH radio button(which defaults to port 22)
then click on open which prompts you for the linux box username and
password.
Then navigate to the bin folder which is inside of your
crx-quickstart folder is located.
Example: Navigate to "/CQ5/Author/crx-quickstart/bin/"
Use "sh start" or "sh stop" commands to run start and stop scripts of the CQ. Some more info
You can list the process which are up and running on which address by " netstat -lnptu " command
Use " kill -15 PID " for killing a process with specific process id (Example : kill -15 5574)

Apache Felix provides a shell that allows you to interact with the OSGi framework and with shell extensions that CQ5 or applications that run on it can supply. Maybe that's what you're looking for.
Installing the org.apache.felix.shell, org.apache.felix.shell.remote and org.apache.felix.shell.tui bundles provides a remote shell that's accessible via telnet 6666 by default.
Adding the org.apache.felix.gogo.command, org.apache.felix.gogo.runtime and
org.apache.felix.gogo.shell bundles activates the richer Gogo shell.

Related

Is it possible to restart the server using WinSCP?

I transferred the files from my local computer to the remote directory using WinSCP, but I'm curious if I can restart/reboot the server using the same application or i need to do that using PuTTY.
I don’t think you can. WinSCP is a SFTP client, SFTP its a subsystem of SSH, but that does not mean that you can achieve everything you can do with SSH.
Here’s a complete list of commands supported by the SFTP protocol -> https://www.ssh.com/ssh/sftp/#sec-SFTP-Protocol
As you can see there’s no such ‘reboot’ instruction nor anything similar.
EDIT
As other answer says, WinSCP has the ability to issue remote commands https://winscp.net/eng/docs/remote_command
So you can do Commands > Open Terminal and issue a reboot
WinSCP has Console window, where you can execute most shell commands. The only limitation is that the command must not require terminal emulation. What command like reboot typically do not.
Short answer: you need putty to do it.
Long answer: If you know what you are doing you could have a watch of some kind and reboot the server if you copy a special file (via WinSCP) to the server, I would strongly advise against this.
If you use putty to do this you should be aware that the system user root is most likely forbidden to log in via ssh directly. So you have to use putty with some other user and use su/sudo to reboot.
To reboot a linux server
putty
sudo reboot

Port 8005 is used By Windows 10 System Process

Since today, the port 8005 is used for a Windows System Process. When i try to acces to the url http:localhost:8005 ,i can see a Blank Web Page, with no code and no info from any Web Server (No welcome web page or similar).
With the netstat command i can see that the process that uses this port is System process. Any idea why windows is using suddenly this port?
EDIT: Not duplicate question. I don't have another Tomcat installation, the problem comes from a windows process, not for another tomcat instance.
Check if port 8005 is really in use by Windows :
Install and run Sysinternals TCPView and
Check if the line with "Local Port" 8005 has as "Process" System
Or check the file c:\Windows\CCM\Logs\DeltaDownload.log for port 8005
If the port is in use by system, go to Computer Management and stop the service "SMS Agent Host" or open a command prompt as administrator and type:
sc stop CcmExec
The problems comes from a Windows Service:
https://www.niallbrady.com/2017/02/15/how-can-i-use-express-updates-when-patching-windows-10-with-quality-updates-in-system-center-configuration-manager-current-branch/
Not from another Tomcat instance.
I too was facing the same with windows 10 and ran the command netstat -a -b which showed CmRcService.exe is using the port 8005 on the machine.
The most weird part is sometimes if i hit localhost:8005 in the browser url its asking for username and password to access the page and in the developers tools I cannot see any application name or data whatsoever

How can I use remote host options TCPProxy on Grinder?

I want to test Desktop application with Grinder. My application is multiple client/server app. I must use TCPProxy and remotehost options. But I couldn't. Please guide me.
I have solved this. if we connect a remote host and if we use proxy, we must set proxy:
Open cmd
cd c:\grinder
C:\grinder>java net.grinder.TCPProxy -remotehost myremotehost -remoteport myremoteport -console>test.py
and recording process

Exec a program on client runs a programm on server

First of all I have spent over 4 hours researching this topic..
So I have a Windows 2008 r2 root server at the moment. I connect to it via Remote Desktop.
Now I want to write a program that runs batch files on the server but the program is at client side, I have tried to setup an SSH server on my Windows server with Freesshd.
That seems to work but the programs are not shown. (In Taskmanager are they)
Is there way (prefer SSH) to let them show normally?
The goal is to restart programs (Gameservers).
My Program will work so: if I press restart server it will connect (if SSH) via Putty to the server to exec the batch file.
Or will start another program with parameters something like this:
Clientprogramm -ip 95.25.115.** -user Administrator -p xxxxxx C:\gameserverdir\start.bat
Simple and fine. I have done that already for Linux and there it isn't that hard.
So if you have an idea that can help me would be nice to know.
Both system are Windows!
If you are using SSH, the tool you need is plink. It's putty for command line.
Or, as indicated in comments, you can use psexec, or powershell, or vbscript, or .... BUT started programs are only "visible" in the same session from where they were started.

How to Connect to localhost with SSH(PuTTy)

I just figured how to connect to my webhost with PuTTy .
But how to I connect to my localhost? I put
Servername: localhost
port: 22 (I've tried 80 too)
And it gives me an error "failed to connect"
How do I connect?
If you are using Cygwin on your local host, you can connect to Cygwin's sshd (SSH Daemon).
3 easy commands to install the sshd as a service: (always there when you startup the machine)
$ ssh-host-config -y # enable sshd. "-y" answers yes to all queries.
$ cygrunsrv --start sshd # start it as an autostart Windows service
$ ssh localhost # try to recursively log in via ssh
Taken from: http://nfnaaron.posterous.com/tag/puttycyg#Section2
(The second approach)
=> You get the entire ssh infrastructure: public key authentication, ssh-agent, etc...
Ensure that you have running a SSH server (such as openssh-server) running on localhost and not just a web server (such as apache). Also ensure, that localhost is really mapping to 127.0.0.0/8
The solution in the answer above won't work unless you have installed Cygwin with the OpenSSH package selected - you have to do this manually during the installation process (see option a below).
Depending on the intended purpose of your connection you can try one of the options below, option (b) being much easier to install but lacking the *nix shell capabilities.
a. You can install a Cygwin shell with ssh server, this site (http://ist.uwaterloo.ca/~kscully/CygwinSSHD_W2K3.html) has instructions for Windows Server but they work for other Windows too with may be some of the questions shown in the output on the page not appearing on non-server version of Windows. Also, where it says in the instructions to issue the command:
mount -s --change-cygdrive-prefix /
delete the -s option so that the command is
mount --change-cygdrive-prefix /
(at least this was the case for me on Windows 7).
b. PuTTy site suggests WinSSHD (http://www.bitvise.com/winsshd-download). It's an easy self-installer. Once it's up you have to click onthe StartSSHD link about 1/3rd of the screen down on the first page of the config window. Then you can connect your PuTTy to localhost. However, in my experience, it didn't provide any *nix command support, only the native Windows ones and I couldn't find anything in their user guide on this.
Hope this helps.
Just adding this answer in case anyone is still looking for a solution.
In your hostname (or IP address) section, enter localhost or 127.0.0.1
Leave the port to its default value 22
Click on open
Now a login shell will popup -
Log in as your username, your username is basically what you get when you type whoami in your Terminal.
In the password section, type the password that you use as your system's password.
The above steps should connect localhost with ssh(PuTTY)

Resources