I am trying to copy a jar file from my local machine to linux(centos) server, but I am getting an error.
This is my command:
pscp Watch.jar dev#10.10.40.74:/home/dev/Documents
Watch.jar is the name of my jar and dev is my user on my server. I am trying to copy this file to a particular location(home/dev/Documents)
The error I got is:
Watch.jar: Network Error occurred
http://i.stack.imgur.com/aVBIj.png
And when I run java -jar Watch.jar on my linux server, it says
Error: Invalid or corrupt file.
Any help would be appreciated.
Related
I want to download a file from my Linux server to my local Windows PC.
I used SecureCRT to build an SSH connection and then use SFTP get command to download, but failed:
sftp> get /remote/path/file.svg D:\local\path
Downloading file.svg from /remote/path/file.svg
get: D:/local/path: The system cannot find the file specified.
100% 39KB 39KB/s 00:00:00
/remote/path/file.svg: 40319 bytes transferred in 0 seconds (39 KB/s)
sftp>
I found out that it is possible to upload files from Windows to Linux.
But unable to download any file from Linux to windows
Very confused, I have tried many ways to solve this problem. Can someone help me?
The Secure CRT documentation for get does not say anything about possibility of specifying the target local path:
https://documentation.help/SecureCRT/SFTP_Tab_Command_Options.htm
You possibly need to lcd before:
lcd C:\target\local\path
get /source/remote/path/file.txt
I have a file called test1.zip in /mnt/c/Users/test/ folder of my local laptop [in which ubuntu windows subsystem for linux is installed]. Local ubuntu terminal WSL name is lauda
Now, I would like to transfer this zip file called test1.zip to my remote server named stuff.
PLEASE NOTE THAT ALL COMMANDS ARE TRIED FROM MY LOCAL LAPTOP WSL SCREEN [ubuntu screen]
So, I tried the below command from my WSL [local laptop ubuntu WSL terminal]
scp user1#lauda:/mnt/c/Users/test/test1.zip user1#stuff:/home/test/codes/test1
and got the error ssh: Could not resolve hostname lauda: Name or service not known
So I tried the below [replacing the lauda local laptop ubuntu terminal hostname with its IP]
scp user1#172.xx.xxx.xxx:/mnt/c/Users/test/test1.zip user1#stuff:/home/test/codes/test1
this resulted in error as ssh: connect to host 172.xx.xxx.xxx port 22: Connection refused
Now I tried the same command as above but in opposite way as shown below
scp user1#stuff:/home/test/codes/ user1#lauda:/mnt/c/Users/test/test1.zip
and got the below error
ssh: Could not resolve hostname lauda: Temporary failure in name resolution
Later, I tried with IP address
scp user1#stuff:/home/test/codes/ user1#172.xx.xxx.xxx:/mnt/c/Users/test/test1.zip
And I got the below error
ssh: connect to host 172.xx.xxx.xxx port 22: No route to host lost connection
Later, I tried the below commands as well
scp /mnt/c/Users/test/test1.zip user1#stuff:/home/test/codes/
and got an error scp: /home/test/codes/test1.zip: Permission denied
So, I again tried like below
scp user1#stuff:/home/test/codes/ /mnt/c/Users/test/test1.zip
and got an error scp: /home/test/codes: not a regular file
PLEASE NOTE THAT ALL COMMANDS ARE TRIED FROM MY LOCAL LAPTOP WSL SCREEN [ubuntu screen]
How can I transfer local files/folders from my local ubuntu WSL terminal to remote server?
scp /mnt/c/Users/test/test1.zip user1#stuff:/home/test/codes/ is the closest attempt to working. The error you get could be due to one of two reasons:
Firstly user1 does not have permissions to write to /home/test on stuff - makes sense as usually only the test user would be able to write there. (Note that the test user on your WSL instance is not the same profile the test user on the remote.)
Secondly the /home/test/codes/ folder may not even exist yet.
Instead (if you know test's password) copy as the test user :
scp /mnt/c/Users/test/test1.zip test#stuff:/home/test/codes/
Or copy to user1's home directory (after ensuring you have created /home/user1/codes/
scp /mnt/c/Users/test/test1.zip user1#stuff:/home/user1/codes/
I am having an error while trying to attach to the quorum node, using the following command :--
geth attach --datadir new-node-1/geth.ipc
then I get this error
Unable to attach to remote geth: dial unix new-node-1/geth.ipc: connect: no such file or
directory
I tried to locate path of geth.ipc but nothing was there. I guess the file is not being created.
any suggestions guys..
You should be running the command like this (without --datadir):
geth attach new-node-1/geth.ipc
If that still doesn't work then make sure you have the correct path for the ipc file. Is new-node-1 definitely the same path that was specified to the quorum node when it was started (i.e. with with --datadir new-node-1).
If the path is correct but geth.ipc file doesn't exist then the node hasn't managed to start up. Check the log file to see if there were any errors.
Try out below:
geth attach http://127.0.0.1:8545
It worked for me
I am trying to run an executable jar file which will execute a test suite(using selenium/ cucumber) on linux environment by using the command java -jar -webdriver.chrome.driver=pathofchromedriver myjarfile.jar
I have the following error :
Starting ChromeDriver 2.41.578700 (2f1ed5f9343c13f73144538f15c00b370eda6706) on port 29256
Only local connections are allowed.
[1534896949.211][SEVERE]: bind() returned an error, errno=99: Cannot assign requested address (99)
I tried to change the chrome driver version but it's not working. Does anybody knows how to fix it please?
I need to start a win10 app remotly.
What I already tried is:
for starters I used this path: shell:appsfolder\appname!app
using psexec to start the app doesn't work
same with powershell (over psexec as well as native ps remote)
also tried starting it indirectly from a .cmd file and .vbs file executing form psexec
all these command and files are working if executed directly on the client. But if I try to execute them remotly I get the error message path not found or it just nothing happening and really nothing I checked if the appropriate exe file is running via taskmanager. Apparently there must be some issue with the name translation of shell:appsfolder over a remote session.