Is there a library to connect my Terminal using Robot Frmaework? - python-3.x

I want to run jobs in terminal connecting SSH tunnels. Is there any way that I can do it?
I should connect to Terminal
Access SSH tunnels
Access pentaho. sudo us - pentaho
Run my jobs

There is a SSHLibrary - https://github.com/robotframework/SSHLibrary & http://robotframework.org/SSHLibrary/SSHLibrary.html

Related

Connect to Linux Server from Powershell of windows server

I am trying to connect to a Linux server with sftp type in power shell but it's not getting connected. Tried many ways but couldn't figure out anyway as the power shell I have is restricted for using ssh, posh-ssh, and OpenSSH. But it gets connect via cmd prompt. one way to connect to it. Which is: Start-Process cmd - ArgumentList "/K sftp username#servername"
This opens cmd and runs the command but as it connects to Linux server it won't allow me to append another command to execute it. Like Start-Process cmd - ArgumentList "/K sftp username#servername & bye". The "bye" is command we use to come out Linux server but this is not letting to use it.
If anyone has any idea how we do it or any other way to connect please let me know.

running SSH script command from jenkins using SSH

To deploy application on linux ubuntu server I have bunch of SSH commands that i currently run using PuTTY. The server has local account serviceaccount1. In PuTTY i connect to server using serviceaccount1 and executes the following commands one by one
cd /home/serviceaccount1/cr-ml
script /dev/null
screen -S data_and_status
cd cr-ml/notebooks
source activate crml
unset XDG_RUNTIME_DIR
jupyter kernelgateway --api='kernel_gateway.notebook_http' --seed_uri='data_and_status_api.ipynb' --port 8894 --ip 0.0.0.0
...
...
and so on
Now i want automate this using Jenkins. I installed SSH plugin, configured credential using SSH Username serviceaccount1 with private key
Then created a new jenkins project and added a build step Execute shell scripts on remote host using ssh and then add all the above commands.
When i build the jenkins project, it get stuck at executing 2nd command script /dev/null
i see the following console output
To me, it seems the culprit is the screen -S data_and_status command. Once you start a screen, I don't think you would be able to execute the subsequent commands over the SSH connection.
Alternatively, you can try using a tool like Ansible to run a bunch of commands against a remote server.

Ubuntu : Turn on and login into a remote computer

I want to run some application on a remote computer. I am able to turn it on using wakeonlan but how can I log into it and start the application using terminal?
ssh yourusername#computernameorip
ProgramNameToExecute

Launching multiple GUI programs from crontab

I want to launch multiple GUI programs from crontab. I have tried the following, but it did not work:
export DISPLAY=:0.0 && task1
export DISPLAY=:1.0 && task2
When I execute above crontab commands, I am getting error as:
**No more handles [gtk_init_check() failed]**
1) You need to allow clients to connect from any host using xhost + <clientmachineName>
So it will look like:
hostmachine$ xhost + <clientmachineName>
2) Then connect to the client machine either directly or from any third machine where the VNC is enabled.
If you are using the third machine & not the client machine itself, then you need to enable x11 forwarding, by executing ssh -X <username#clientmachine>
3) After that you can open the gui application of the host machine, from the client terminal running on the client machine or the client terminal running on the vnc session of the third machine, for which export DISPLAY=<thirdmachine>:<sessionid no> is required.

Unable to connect server via putty and winscp

By mistake i ran the command shutdown -r now which causes connection error when i am connecting server via putty and winSCP.
How can i connect to the server?
shutdown -r now command reboot the system but i dont think so it get restart.
It might be shut down so couldn't able to connect.
Putty Fatal Error : Connection Time Out
you can not do it your self if you rent a server from datacenter . You need to call network support guyz to turn on the system. Thats the only way..

Resources