ssh connection refused on windows (wsl) [closed] - ssh

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
Stuck on error while starting a ssh server
I already installed openssh-server and openssh-client
Here is the image of error

The normal option to use when starting sshd would be:
-D to test it (preventing it to detach its process and force it to run in foreground: try the ssh in a separate Windows)
-h host_key_file if you are running it as a non-root user
-p port, again if you are launching the daemon as a non-root user (and cannot use privileged ports
If you can, in your WSL2 session, try
sudo sshd
That will run it as root, in the background
Then try your ssh command, making sure you have copied ~/.ssh/id_rsa.pub first in ~zeus/.ssh/authorized_keys.
If that does not work, kill then run again sshd, this time with:
sudo sshd -d
That will launch it in foreground, and you will be able to see if your ssh command at least is received by the SSH server, and if there are any error messages.

Related

SSH Permission denied error in virtual box Guest [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
I am running Virtualbox 5.0.18 with ubuntu desktop 14.04 distribution.
There are 4 VMs, 3 with ubuntu server 14.04 , 1 running ubuntu Desktop 14.04.
All VMs have NAT and Host-only network configured.
SSH to ubuntu Desktop 14.04, VM and host machine, is doing ok
SSH to VMs running ubuntu server 14.04 is giving me permission denied error.
Which logs should I look, to figure out the problem?
Ping is working, both way, for servers as well as desktop and telnet host 22 is ok for desktop only
As said in my comments.
You need to see if your sshd has started. if yes, you need to figure out the logs. One of the advice would be to start your sshd with some -d options to get more verbose debug output.
And see this blog if your vbox's config is the same.
Last but not least, here is the step by step troubleshooting for any linux appliances
All the best

SCP File Transfer Between Pi and Windows [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
With pscp in windows command line, i can send file from Windows to Pi or i can copy a file from Pi to Windows. But opposite does not work. I cant send a file from pi to windows with pi's terminal.
scp text.txt username#192.168.1.100:C:/Users/Desktop/
or C/Users/Desktep with out colon.
Both does not work. It returns nothing. After few minutes it says connection timed out.
scp is a client that connects to a server. Your Pi is running an SSH server which allows you to connect to it from other machines using pscp or scp (depending on what OS). So to make it work the other way, you need to install an SSH server on your windows machine.
I followed this article to install on my windows machine:
http://linuxbsdos.com/2015/07/30/how-to-install-openssh-on-windows-10/
Sometime in the future based on the announcement by Microsoft at http://blogs.msdn.com/b/powershell/archive/2015/06/03/looking-forward-microsoft-support-for-secure-shell-ssh.aspx it appears Windows will have SSH server.

Centos 7 Remote SSH access denied [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I installed Centos7, all fine, till I want to access via SSH, I get always Access Denied.
I get it with the root user, and another new created user
I tested SSH within the LAN, so no firewall issue
For the root user "PermitRootLogin yes" is set.
SSH service is started
... till now, I have no clue what I ignored to set it right to have it working.
I got a look into the secure log. When I try to login with the root user on the LAN, I do like:
ssh root#192.168.2.11
in log I get: invalid user root#localhost from 192.168.2.108
When I try through VPN-tunnel:
ssh root#192.168.2.11
in log I get: invalid user kristoxxxxxxxx
this is my username on my OSX device. why is this one passed?
This may be due to RSA or DSA keys, os please delete or backup following files from /etc/ssh director to another one.
ssh_host_dsa_key, ssh_host_dsa_key.pub, ssh_host_key, ssh_host_key.pub, ssh_host_rsa_key , ssh_host_rsa_key.pub etc
Now restart your sshd service
service sshd restart

Access Raspbian wheezy desktop GUI through ssh [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I have a Raspberry pi that I have been accessing through SSH, but now I need to run a python program on it that has a GUI. I'm not sure how to do this through SSH. Usually I get to my raspi's desktop gui by typing startx. Is there anything I can do like this over ssh?
Thanks!
The approach mentioned by kjprice just displays the applications you started on the remote host. If you want to see a complete dektop, you could either create a new Xserver or use Xephyr to nest a Xserver in the one you are currently using.
Well first create a new nested Xserver:
user#host $ Xephyr :1 -screen 800x600 &
A window called "Xephyr on :1" should spawn. Ssh into the remote host an forward the display to the created display:
user#host $ DISPLAY=:1 ssh -Y username#remotehost
Now start a session on the remotehost, in my case LXDE:
user#remotehost $ lxsession
You should now see the desktop in Xephyr. hf
You can do X11 forwarding with ssh. If you start an ssh session with -Y or -X it'll enable X11 forwarding. So, any program you run in that session that creates a window, the window will be drawn locally. You can also pass ssh a command to run :
$ ssh -Y user#$some_ip /path/to/some/remote/python_script.py
If you want a full gui session, then you'll want to setup an RDP or VNC server on the rasp pi and connect to it with some client.

ssh scp command not working [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I am using PuTTY to connect my Windows machine with remote machine and I am able to connect to remote machine but when I am using SCP command to download some files to my local Windows machine it is saying:
ssh: connect to host XXXXXXXXXX port 22: Connection refused
lost connection
I am writing this command:
scp * username#mywindowsmachine:~/Desktop
Use winscp to do this :
http://winscp.net/eng/docs/introduction
WinSCP will enable you to exchange files with the server while ssh is used to issue shell commands on this server (and is powerless in your case as your local windows machine can't probably answer to its ssh connections).
You would use scp if you were on a shell but as you're on windows (and probably don't use things like cygwin), you'll find winscp to be the easiest solution.
if you manage the server you are trying to connect to, start the SSHD with debugging enabled you will see exactly why it is refusing the connection
IF sudo chown -R www-data:webmasters/dir/dir/dotfile - possibly need to give permissions to your bash "user" instead via ssh.