ssh scp command not working [closed] - ssh

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.

Related

ssh connection refused on windows (wsl) [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 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.

FileZilla SFTP connection through intermediate SSH [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 8 years ago.
Improve this question
I am using PuTTY to connect to an intermediate Linux based server. On that server I use ssh to connect to the (Linux based) server I try to target. On that server I want to run a program, but I have to send it to that inner server from my PC. A direct connection is not possible.
At the moment I use PSFTP to the intermediate server and PuTTY+sftp from the intermediate server to the inner server to send the file, but this takes a lot of work to do everytime.
Is there a way to use FileZilla to set up an SFTP connection to the inner server through the intermediate server?
So in stead of:
PSFTP: PC -> user#intermediate
PuTTY: PC -> user#intermediate
sftp: user#intermediate -> user#inner
I want:
FileZilla: PC -> intermediate -> user#inner
You can setup an SSH tunnel (aka port forwarding) using PuTTY from the intermediate server to the target server and connect with FileZilla to the tunnel.
See details on port forwarding in PuTTY.
Or see a specific guide for setting up port forwarding to tunnel file transfer client (WinSCP particularly, though you can apply it to FileZilla easily).
Actually, WinSCP SFTP client has a (single step) tunneling functionality built in. So, with WinSCP, it is very easy to do what you ask for. See the Tunnel page of its Advanced Site Settings dialog.
(I'm the author of WinSCP)

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.

PuTTy connecting to server from one machine and not from another [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 trying to connect to a server(linux) via SSH from a windows m/c via putty.
I can connect to the server from my m/c using putty but when i try to do the same from another machine, i get an error.
All configs are the same. Can you please give some pointers as to what might be the issue.
Note: I am able to do an FTP(port 21) to the same server via WinSCP on both machines. It's just putty which is not doing SSH on the other m/c. It's fine on my m/c.
Any directions would be much appreciated.
Thanks.
Can you log in with WinSCP via SFTP/SCP? If not, then the server might be firewalled against that other machine. Or maybe the two machines are connected to the server with different interfaces and SSH is configured to only listen to one of them. Check the firewall on the server and, for good measure, the firewall on your client.

How to download folder from putty using ssh client [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
how to download folder(contains folder inside folder and files) from putty using ssh client
i want download entire Dump to local Drive...
can any one guide me ...
You need to use some kind of file-transfer protocol (ftp, scp, etc), putty can't send remote files back to your computer. I use Win-SCP, which has a straightforward gui. Select SCP and you should be able to log in with the same ssh credentials and on the same port (probably 22) that you use with putty.
You cannot use PuTTY to download the files, but you can use PSCP from the PuTTY developers to get the files or dump any directory that you want.
Please see the following link on how to download a file/folder:
https://the.earth.li/~sgtatham/putty/0.60/htmldoc/Chapter5.html
If you need to download a folder via a Linux command try this out:
$ scp your_username#remotehost.edu:foobar.txt -r /some/local/directory
Sources:
http://www.linuxquestions.org/questions/linux-general-1/useing-scp-to-copy-entire-directories-with-sub-folders-362842/
http://www.hypexr.org/linux_scp_help.php
Related Post:
How to download a file from server using SSH?
8)
I use both PuTTY and Bitvise SSH Client. PuTTY handles screen sessions better, but Bitvise automatically opens up a SFTP window so you can transfer files just like you would with an FTP client.