ssh

A way of typing multiple commands in cmd.txt file using PuTTY batch against Cisco

妖精的绣舞 提交于 2021-01-15 10:10:59
问题 I am running batch file in Windows environment using PuTTY.exe command below: for /L %%n in (1,1,5) do ( SET z=Site%%n% start c:\Users\emrpocadmin\desktop\putty.exe -ssh IPAddress -l User -pw Password -m c:\Users\emrpocadmin\desktop\cmds.txt -load Site%%n% ) This batch should load variable profiles ( n from 1 to 5) predefined in PuTTY and run on them one-by-one the commands defined in cmds.txt file; then save the output to certain folder.. However, in cmds.txt file i could only enter one

A way of typing multiple commands in cmd.txt file using PuTTY batch against Cisco

╄→гoц情女王★ 提交于 2021-01-15 10:05:38
问题 I am running batch file in Windows environment using PuTTY.exe command below: for /L %%n in (1,1,5) do ( SET z=Site%%n% start c:\Users\emrpocadmin\desktop\putty.exe -ssh IPAddress -l User -pw Password -m c:\Users\emrpocadmin\desktop\cmds.txt -load Site%%n% ) This batch should load variable profiles ( n from 1 to 5) predefined in PuTTY and run on them one-by-one the commands defined in cmds.txt file; then save the output to certain folder.. However, in cmds.txt file i could only enter one

SSH back to AWS Lightsail after UFW enabling

泄露秘密 提交于 2021-01-05 09:11:24
问题 I've enabled the UFW service without allowing SSH access before then logging off. I am now unable to ssh back to the instance. The steps I have already taken: Made a snapshot and create a new instance from it 回答1: The general point: try to execute a command ( firewall disabling ) while creating a new instance. I was able to do it with the usage of AWS CLI: aws lightsail create-instances-from-snapshot --region eu-central-1 --instance-snapshot-name TEST_SSH_FIX-1591429003 --instance-names TEST

SSH back to AWS Lightsail after UFW enabling

随声附和 提交于 2021-01-05 09:11:07
问题 I've enabled the UFW service without allowing SSH access before then logging off. I am now unable to ssh back to the instance. The steps I have already taken: Made a snapshot and create a new instance from it 回答1: The general point: try to execute a command ( firewall disabling ) while creating a new instance. I was able to do it with the usage of AWS CLI: aws lightsail create-instances-from-snapshot --region eu-central-1 --instance-snapshot-name TEST_SSH_FIX-1591429003 --instance-names TEST

SSH back to AWS Lightsail after UFW enabling

主宰稳场 提交于 2021-01-05 09:10:53
问题 I've enabled the UFW service without allowing SSH access before then logging off. I am now unable to ssh back to the instance. The steps I have already taken: Made a snapshot and create a new instance from it 回答1: The general point: try to execute a command ( firewall disabling ) while creating a new instance. I was able to do it with the usage of AWS CLI: aws lightsail create-instances-from-snapshot --region eu-central-1 --instance-snapshot-name TEST_SSH_FIX-1591429003 --instance-names TEST

SSH back to AWS Lightsail after UFW enabling

旧时模样 提交于 2021-01-05 09:10:41
问题 I've enabled the UFW service without allowing SSH access before then logging off. I am now unable to ssh back to the instance. The steps I have already taken: Made a snapshot and create a new instance from it 回答1: The general point: try to execute a command ( firewall disabling ) while creating a new instance. I was able to do it with the usage of AWS CLI: aws lightsail create-instances-from-snapshot --region eu-central-1 --instance-snapshot-name TEST_SSH_FIX-1591429003 --instance-names TEST

ssh-add from bash script and automate passphrase entry

故事扮演 提交于 2021-01-03 06:13:53
问题 I am trying to do ssh-add from script (don't care about about security at the moment). Now ssh prompts for passphrase, which needs to be automated, so i read couple of things like this and found expect. And now i do following: eval `ssh-agent -s` script tmp.sh defined as : #!/usr/bin/expect spawn ssh-add /root/.ssh/id_rsa expect "Enter passphrase for /root/.ssh/id_rsa:" send "my_pass" interact ./tmp.sh ssh-add -l If ssh-add would have worked it shows something like 4096 SHA256:wlfP

ssh-add from bash script and automate passphrase entry

时光毁灭记忆、已成空白 提交于 2021-01-03 06:13:41
问题 I am trying to do ssh-add from script (don't care about about security at the moment). Now ssh prompts for passphrase, which needs to be automated, so i read couple of things like this and found expect. And now i do following: eval `ssh-agent -s` script tmp.sh defined as : #!/usr/bin/expect spawn ssh-add /root/.ssh/id_rsa expect "Enter passphrase for /root/.ssh/id_rsa:" send "my_pass" interact ./tmp.sh ssh-add -l If ssh-add would have worked it shows something like 4096 SHA256:wlfP

ssh-add from bash script and automate passphrase entry

拥有回忆 提交于 2021-01-03 06:11:49
问题 I am trying to do ssh-add from script (don't care about about security at the moment). Now ssh prompts for passphrase, which needs to be automated, so i read couple of things like this and found expect. And now i do following: eval `ssh-agent -s` script tmp.sh defined as : #!/usr/bin/expect spawn ssh-add /root/.ssh/id_rsa expect "Enter passphrase for /root/.ssh/id_rsa:" send "my_pass" interact ./tmp.sh ssh-add -l If ssh-add would have worked it shows something like 4096 SHA256:wlfP

ssh-add from bash script and automate passphrase entry

大城市里の小女人 提交于 2021-01-03 06:11:41
问题 I am trying to do ssh-add from script (don't care about about security at the moment). Now ssh prompts for passphrase, which needs to be automated, so i read couple of things like this and found expect. And now i do following: eval `ssh-agent -s` script tmp.sh defined as : #!/usr/bin/expect spawn ssh-add /root/.ssh/id_rsa expect "Enter passphrase for /root/.ssh/id_rsa:" send "my_pass" interact ./tmp.sh ssh-add -l If ssh-add would have worked it shows something like 4096 SHA256:wlfP