ssh

Executing multiple commands over SSH “exec” channel on firewall device with Java JSch does not work

99封情书 提交于 2020-05-28 07:02:47
问题 I referred the question Multiple bash commands and implemented as below. I am connecting to a device for which first command should be configure then only I will get a prompt to execute all other commands. I don't get output for any of the commands and the control does not return. The following are the commands that work in terminal. ssh uname@ip configure # this command changes prompt and enable following commands move shared pre-rulebase security rules TEST top commit exit exit As asked for

Executing multiple commands over SSH “exec” channel on firewall device with Java JSch does not work

只愿长相守 提交于 2020-05-28 07:01:33
问题 I referred the question Multiple bash commands and implemented as below. I am connecting to a device for which first command should be configure then only I will get a prompt to execute all other commands. I don't get output for any of the commands and the control does not return. The following are the commands that work in terminal. ssh uname@ip configure # this command changes prompt and enable following commands move shared pre-rulebase security rules TEST top commit exit exit As asked for

How to control a TPLINK router with a python script

泄露秘密 提交于 2020-05-27 08:17:30
问题 I wanted to know whether there is a tool that allows me to connect to a router and shut it down, and then reboot it from a python script. I know that if I write in a python script: import os and then do os.system("ssh -l root 192.168.2.1") , I can connect through python to my router. But then, I don't know how to apply the router's password, and to log into it, in order to reboot it. So after working on it a bit here is the code that I have written in order to connect to my router with an SSH

Is it possible to access a Github Wiki via SSH?

夙愿已清 提交于 2020-05-25 09:00:08
问题 I just created a Wiki for a Github repo, and cloned it to my desktop. There is only the option to clone using https , which means every time I try to push git asks me for my username and password. Is there some way to use SSH in a Github Wiki as I do with all my standard repos? I checked the Wiki help but couldn't find anything there. I' using 2FA in Github by the way. 回答1: You can also clone wiki via ssh : git clone git@github.com:YOUR_USERNAME/YOUR_REPOSITORY.wiki.git 来源: https:/

Cannot connect to EC2 - ssh: connect to host port 22: Connection refused

|▌冷眼眸甩不掉的悲伤 提交于 2020-05-25 06:53:33
问题 I am currently overseas and I am trying to connect to my EC2 instance through ssh but I am getting the error ssh: connect to host ec2-34-207-64-42.compute-1.amazonaws.com port 22: Connection refused I turned on my vpn to New York but still nothing changes. What reasons could there be for not being able to connect to this instance? The instance is still running and serving the website but I am not able to connect through ssh. Is this a problem with the wifi where I am staying or with the

Cannot connect to EC2 - ssh: connect to host port 22: Connection refused

安稳与你 提交于 2020-05-25 06:52:45
问题 I am currently overseas and I am trying to connect to my EC2 instance through ssh but I am getting the error ssh: connect to host ec2-34-207-64-42.compute-1.amazonaws.com port 22: Connection refused I turned on my vpn to New York but still nothing changes. What reasons could there be for not being able to connect to this instance? The instance is still running and serving the website but I am not able to connect through ssh. Is this a problem with the wifi where I am staying or with the

Failed to add the host to the list of know hosts

无人久伴 提交于 2020-05-24 08:50:48
问题 Mac OSX Lion 10.7. In an effort to get around weird environment stuff (homebrew wasn't installing wget, and I had all sorts of weird blocks and errors), I uninstalled zschrc and homebrew and a bunch of other stuff, then installed fish shell. Now, whenever I try to push/pull to/from github, I get this error: The authenticity of host 'github.com (204.232.175.90)' can't be established. RSA key fingerprint is <string of colon-separated chars that I should probs keep private>. Are you sure you

Setting a custom path for git private SSH key on linux

和自甴很熟 提交于 2020-05-24 08:24:05
问题 I'm trying to setup a git client on linux. I uploaded my private key to the machine, and I understand that I should put it in ~/.ssh, but I don't have access to that folder. How can I tell git to look for the private key somewhere else? 回答1: One option is to use ssh-agent and provide a file name to ssh-add . For example: $ ssh-agent /bin/bash $ ssh-add ~/mykeys/id_rsa 回答2: You can achieve that using a ssh config file. First create a file inside your ~/.ssh folder named config , you can use

Executing command using SSH.NET on digi 6030dx modem - what are this character sequences starting with left square bracket?

生来就可爱ヽ(ⅴ<●) 提交于 2020-05-23 10:40:14
问题 I have some large project that connect to many devices over SSH.NET Now I have to add support for new modem witch is digi 6030dx. I added it and I am able to connect with no issues But when I send some/any command like show config the output is: [16C[0K [16C[0Ks [17C[0Kh [18C[0Ko [19C[0Kw [20C[0K [20C[0Kc [21C[0Ko [22C[0Kn [23C[0Kf [24C[0Ki [25C[0Kg Commands ------------------------------------------------------------------------------- config View and modify the configuration exit Exit the

Connecting to Mongo database through SSH tunnel in Java

眉间皱痕 提交于 2020-05-22 19:46:07
问题 FIXED (edited code to reflect changes I made) I'm trying to connect to a Mongo database through an SSH tunnel using Java. I'm using the Mongo driver 3.0.2 and jcraft (JSch) to create an SSH tunnel. The idea is that I: connect to the machine hosting the MongoDB installation through SSH set up port forwarding from a local port to the remote MongoDB port connect to MongoDB remotely My code looks like this: // forwarding ports private static final String LOCAL_HOST = "localhost"; private static