I have to use QEMU VM to emulate SPARC. I've been trying to SCP my finished assignment to my localhost, but I seem to be unable to. Whenever I try:
scp assignment6.zip user#ipv4address:~/
I get this error:
ssh: connect to host ipv4address port 22: Connection refused
I've opened up port 22, and still continue to get this error.
I assume there's something simple I'm missing, but I can really see what it is.
If there are any suggestions, I'd be grateful to hear them.
It's not enough to have the port "open" in the firewall. The "connection refused" message usually means that there is no process listening on the port. I'd recommend checking to see if you actually have an ssh server running on the localhost.
Related
stuck from a couple of days. In ubuntu i'm creating vncserver with command line [tigervnc]
vncserver -localhost yes
to secure connection from only localhost.
vnc is successfully created with port - 5901.
Im using putty to establish SSH tunnelling,
SSH tunnel
in realVNC viewer in using
localhost:9091
But it gives error saying connection refused.
I want to establish a SSH tunnel with only localhost in order to avoid the brute force attack, getting too many authentication failure errors.
What am i doing wrong. Please guide me.
Note : connection works fine if i use vncserver -localhost no. But for security reasons i dont want this
to allow connection from localhost only and to avoid brute-force attack in these any settings need to change in vnc-config or something.
Did a hell of research, couldn't resolve. StackOverflow is the last hope.
Localhost is 127.0.0.1
You have to create SSH TCP FORWARD to localhost (or 127.0.0.1), not 103.16.26.144
There is how I use this on my linux desktop, from a shell terminal.
ssh -fL 9091:localhost:5900 user#103.16.26.144 sleep 2 &&
xvncviewer localhost:9091
I'm trying to ssh into my cisco ISR router. DHCP is working and I can ping the default gateway (the ISR), and can ssh with other devices on the LAN. so I know the LAN connection isn't the problem. I set up a local user that works with console logins so that's not the problem either.
I set up my ssh connection on the router with the following commands:
(config)#line vty 0 21
(config-line)#login local
(config-line)#exec-timeout 3
(config-line)#rotary 1
(config-line)#transport input ssh
(config)#crypto key generate rsa
(config)#ip ssh version 2
(config)#ip ssh port 2222 rotary 1
(config)#ip ssh authentication-retries 3
Then when I nmap the router it has the following ports open:
PORT STATE SERVICE
22/tcp open ssh
However, every time I try to log in to the router I get a Network is unreachable error. This is using the 2222 and 22 port and testing the normal IP and the hostname#ip formats for ssh and absolutely nothing works. I managed to get into telnet with the default settings earlier, but I'm not sure how to get in with SSH.
Thank you all for the help, I know it was very open ended so just let me know anything that could be helpful and I'll provide it.
One logical test step to do, would be switch back to port 22.
Network unreachable usually indicates there's no packet response coming from the host.
It could be because of multiple reasons, but since you've mentioned that ping and telnet went fine. I'd suggest you revert the port config, restart the unit once. See how it goes.
Other possible reasons could be ACL block and/or firewall block on your machine but I think it's unlikely.
I'm a beginner in this sort of thing so I could use a bit of help.
I'm usually able to ssh into my school's local cluster using the following command in Ubuntu 18.05 LTS
ssh username#hostname.com
Now this only works when I'm connected to my school's wifi. Whenever I'm off of it, I receive the following error.
ssh: connect to host hostname.com port 22: Resource temporarily unavailable
After some online digging, I figured I needed to port forward into the server, so I tried putting -L 22:localhost:22 after ssh, but it gave me the following error:
Privileged ports can only be forwarded by root.
If I put sudo before everything, it gives me the same port 22 error from before. I'm terribly lost and any help would be appreciated.
the last command i ran on the host system was:
shutdown -h now
i got the following message:
The system is going down for halt NOW!
Connection to closed by remote host.
I am unable to do ssh to it. Please let me know how can i connect back to my system.
Considering your server is a VPS and you have shut it down, the best option (if not the only) is to contact the service provider and ask for them to start your server again.
EDIT: as per PeteR suggestion, you may ask them to disable your permission to shut down this server, so that this issue never happens again.
On the server, try:
netstat -an
I am trying to tunnel vnc through putty (on win vista) to an ssh server on fedora 14. Normal vnc connections work but the tunnel just terminates immediately. My server config file:
VNCSERVERS="2:Robert 3:Christina 4:Lan 5:Simon"
VNCSERVERARGS[2]="-geometry 1280x800 -localhost"
VNCSERVERARGS[3]="-geometry 1280x800 -localhost"
VNCSERVERARGS[4]="-geometry 1280x800 -localhost"
VNCSERVERARGS[5]="-geometry 1024x600 "
Nothing of significance is being been reported in any of the logs except for the sshd log on the server which prints out one of the following lines: sshd[8993] error connect_to 192.168.1.64 port 5902: failed except I'm actually not trying to connect to 5902. whichever port I try to tunnel to gives the same error.
Problem solved! It turned out that having the having the standard vnc ports forwarded as well as the ssh ports forwarded was causing the issue somehow. (I don't understand how or why at the moment)