Instead of directly connecting to SSh client I have to connect using proxy server and then to ssh client?
I have tried below approach:
in Boto\manage\cmdshell.py I have made below change
while retry < 5:
try:print "connecting ssh client"
proxy = paramiko.ProxyCommand('connect-proxy -S my_proxy_IP:8080')
self._ssh_client.connect(self.server.hostname,
username=self.uname,
pkey=self._pkey,sock=proxy)
which is giving me
File "C:\Python27\lib\site-packages\paramiko\transport.py", line 465, in start_client
raise e
paramiko.SSHException: Error reading SSH protocol banner
I referered this link here in stackoverflow
Paramiko Error: Error reading SSH protocol banner
where they are saying
answer is
This issue didn't lie with Paramiko, Fabric or the SSH daemon. It was simply a firewall configuration in ISPs internal network. For some reason, they don't allow communication between different subnets of theirs.
We couldn't really fix the firewall configuration so instead we switched all our IPs to be on the same subnet.
but in my case my host is amazonaws instance what should i do in that case.
I am doing anything wrong here or how can i ovecome this issue.
Fabric has this available as an option by default since version 1.5, documented here. If you're unable to use Fabric, you might then crib from it's source a better solution for yourself.
Related
I wrote the following command in CMD:
ssh ec2-user#01.01.001.001 -i node.pem
I receive this error:
ssh_exchange_identification: read: Connection reset
I am hosting a website on my Windows Laptop using an Amazon EC2 instance.
How can I get rid of this error?
I can't comment your question due to my low rep to have some further details so I give this a try.
There could be a lot of reasons for this to happen:
the IP is wrong; I suppose that the one you wrote is a fake one. If
it's not, go to your EC2 panel to check the correct one;
the username is wrong; on ubuntu servers you should use ssh ubuntu#ip-address
the server is not reachable for some reason: bad security group
configuration (is the port 22 open?), firewall on your
network/computer...
You can add the flag -vvv to your ssh command to have a very verbose log of your connection so it will we easier to debug.
I don't know what's wrong with it. Here is a screenshot.
(first image is what i've done in terminal to log in my EC2 server
second image is what i've set in "System preference --> sharing --> remote login)
Yosemite is my OS. Please help me,
Assuming that you have the right key file, you could be running into some security settings issues. Check your security group and make sure that the server is accepting connections on port 22 from all addresses. Also, I generally use the IP address when SSHing into an EC2 box instead of a url, as it is much shorter and more concise. Also, make sure that your server is running Ubuntu. I know that different OS's on EC2 use different default usernames.
Your default username can be found at this page:
http://alestic.com/2014/01/ec2-ssh-username
In the end, your ssh command should be something like
ssh -i otkey.pem [username for your os]#[ip of your box]
Hope this helps!
You've got the right command for an ubuntu server. Check to make sure that security groups are configured and that you don't have Network Access Control Lists configured on your VPC. The configuration you made to the settings of your laptop are to open it up for people to log into your laptop, they don't do anything to facilitate you connecting out.
I did a lot of research for following matter and I got a lot of helpful information but the matter still remains, so I'm going to write it with full details
I'm trying to run "Remote Server Administration" with VisualSVN Server (Enterprise Edition), the server is Windows Server 2008 connected to the internet via router with port forwarding to this server. The client is not at local network so I use a static IP for the server.
Also I did every things written at this URL: http://www.visualsvn.com/support/topic/00025/
but I still get the following error message Connot connect to WMI namespace "..." : the RPC server is unavalible (0x800706ba) when I'm trying to "connecting to another computer".
On the other-hand, I can browsing the "Repositories" content by any web-browser successfully.
How can I manage the Repositories at remote servers?
"...the RPC server is unavalible (0x800706ba)" error indicates a connectivity issue to the remote machine.
Accessing WMI remotely requires port 135 TCP/UDP and all TCP ports above 1024 (1024-65535) to be opened (and forwarded), by default. You can setup fixed port for WMI to simplify the port-forwarding / proxy setup task. In order to setup the fixed port, follow steps described in the article "Setting Up a Fixed Port for WMI". After you follow these steps you are required to setup port forwarding and proxy rewrites (if any) for 135 TCP/UDP and port 24158 TCP.
"...Access is denied (0x80070005)" error indicates insufficient permissions to access WMI remotely. Add your user account to the local group on the remote machine: "Distributed COM Users".
This might seem like a duplicate question but it is not. I tried to go through similar questions but I couldn't find a fix for my problem. Here is my problem:
I need to set up an ftp connection on company servers.
I can easily connect to ftp server from fileZilla on my PC but when I try it over one of the server machines to the file server all I see is the following:
Response: fzSftp started
Command: open "*****#***.***.***.**" **
Error: Connection timed out
Error: Could not connect to server
Status: Waiting to retry...
Status: Connecting to ***.***.***.**...
Response: fzSftp started
Command: open "*****#***.***.***.**" **
Error: Connection timed out
Error: Could not connect to server
I googled the "Connection timed out"
error and I realized that the first place to check is firewall or router setting. these are outsourced to another company and they say that the issue is solved and it should work fine. I don't know where to look at.
I've had lots of issues with Filezilla. You may try another software first to see if Filezilla itself is the issue.
If you're on Windows, I highly suggest the open source project WinSCP (https://winscp.net/eng/download.php). For Mac, Cyberduck (https://cyberduck.io/?l=en) is solid (and free), though you may prefer Transmit.
I was having this problem after upgrading Filezilla. I downgraded it to a previous version and it worked like charm. I came across this ticket thread and it was absolutely helpful : Filezilla Support Ticket
Check your security group rules. You need a security group rule that allows inbound traffic from your public IP address(Google: What is my ip?) on the proper port.
Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
In the navigation pane, choose Instances, and then select your instance.
In the Description tab, next to Security groups, choose view rules to display the list of rules that are in effect.
For Linux instances: Verify that there is a rule that allows traffic from your computer(public ip) to port 22 (SSH).
For Windows instances: Verify that there is a rule that allows traffic from your computer(public ip) to port 3389 (RDP).
Also take a look at here and here for more details
I need to set up an ftp connection on company servers. I can easily connect to ftp server from fileZilla on my PC but when I try it over one of the server machines to the file server all I see is the following:
<failure to connect code>
Please note that public IP and internel IPs will be a different address; such as 123.456.675.574 for the public but internal to the server network it will be something more like 192.168.10.574 .
This is why you can easily connect from your PC because it uses the public IP address but from the internal IP network of the company servers that address will not be valid, and the internal one would need to be used instead.
Try this, 200 is just an example, just increase it and try.
Edit --> Settings --> Connection --> Timeout in seconds = 200
Hi I in an attempt to connect to more than one heroku account I did a number of stuff that has led to this error. "ssh: connect to host heroku.com port 22: No route to host" I dont know what the problem is or how to solve it so I want to start all over with heroku and ssh keys on my machine. How to I delete the present configurations and start afresh?
A few things I would attempt to do:
Ensure that there is no quirky setup in your HOSTS (/etc/hosts) file that is causing confusion
Check your ~/.ssh directory and ensure that the keys you expect to be there ... are there.
Check your ~/.ssh/config file for any incorrect information
Ensure that your heroku SSH server is actually listening on port 22. A lot of people will change the default SSH port for security purposes.
Ensure that the private key that you're attempting to use is uploaded to the heroku server. Some SSH instances won't tell you that it's an invalid key for security purposes. Instead it will just give you the rejection message you mentioned.
If I think of any other diagnostics I'll be sure to update.
Best of luck.
Perhaps something is set oddly in your $HOME/.ssh/config file. You can try backing up this file and then removing it to see if it resolves your problem.