
So if you are trying to scp a file from a remote server or copy a file from your local system to a remote location and you see that you get the below ssh error,
root@linux-box:/# scp user@192.168.0.10:/tmp/logs.txt /usr/log-dir/
ssh: connect to host 192.168.0.10 port 22: Connection refused
Troubleshooting steps:
- Check if the server IP/address provided is the valid one.
- Check if the remote server is available on some other port instead of 22
- Check if port 22 is open, is there any firewall configuration or access issue, check with yout Admin or ISP provider.
More Posts related to Linux,
- [Fix] Linux - bash: useradd: command not found
- Calculate days between dates using dateutils ddiff command
- pwd Command - Print Working Directory
- Rename a directory using Linux/Unix command
- How to go to the End of File in Nano Editor
- How to tar.gz a directory or folder Command
- How to remove/delete a directory in Linux/macOs
- How to Display content of a file in Terminal Screen?
- ls command sort by file size [Linix/UNIX/macOS/bash]
- How to Copy Entire Directory to another Directory in Linux
- 3 ways to clear screen on Linux Terminal
- Command to check Last Login or Reboot History of Users and TTYs
- How to check uptime of Linux/Unix/macOS system/server using console command?
- How to backup a file in Linux/Unix
- Command to know the installed Debian version?
- Check SSH/OpenSSH version Command
- 3 Commands to stop Nginx Server
- Linux: Create a New User and Password and Login Example
- How to install npm on Ubuntu
- How to List All Users in Linux
- How to Get the List of Shells on Linux
- Fix - ssh-copy-id no identities found error
- Installing and using unzip Command to unzip a zip file using Terminal
- scp: ssh: connect to host xxxx port 22: Connection refused Error
- zsh hello world example
More Posts:
- Fix - ssh-copy-id no identities found error - Linux
- Android Studio : Implement abstract methods shortcut - Android-Studio
- PowerShell iterate and get all SharePoint sites and sub sites - SharePoint
- How to fix Microsoft Windows 10 update error 80070020 - Microsoft
- osascript wants to make changes while Android Studio Installation on Mac OS X - Mac-OS-X
- Permanently set $PATH variable in Mac Zsh shell - MacOS
- Android Studio Button onClickListener Example - Android-Studio
- Java JDBC with Join Queries Example - Java