ssh task, Error occurred while running Task, ClassCastException, Bamboo Data Center 8.2
Asked by Apostal Fales:

```
![ssh_scr.jpeg](/t5/image/serverpage/image-id/316043i7B8C23C3B7AA28C6/image-size/large?v=v2&px=999 "ssh_scr.jpeg")

**I am noob, Ask for more information please if it is needed. I try to creat** **e basic ssh task get**
Error occurred while running Task '(2)' of type com.atlassian.bamboo.plugins.bamboo-scp-plugin:sshtask.
java.lang.ClassCastException: class net.i2p.crypto.eddsa.EdDSAPublicKey cannot be cast to class net.i2p.crypto.eddsa.EdDSAPublicKey (net.i2p.crypto.eddsa.EdDSAPublicKey is in unnamed module of loader com.atlassian.bamboo.agent.bootstrap.classloading.ConditionallyDelegatingUrlClassLoader @565ff265; net.i2p.crypto.eddsa.EdDSAPublicKey is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @56b5f44b)	at net.schmizz.sshj.common.KeyType$6.writePubKeyContentsIntoBuffer(KeyType.java:202)	at net.schmizz.sshj.common.KeyType.putPubKeyIntoBuffer(KeyType.java:388)	at net.schmizz.sshj.common.Buffer.putPublicKey(Buffer.java:499)	at net.schmizz.sshj.userauth.method.KeyedAuthMethod.putPubKey(KeyedAuthMethod.java:55)	at net.schmizz.sshj.userauth.method.AuthPublickey.buildReq(AuthPublickey.java:62)	at net.schmizz.sshj.userauth.method.AuthPublickey.buildReq(AuthPublickey.java:81)	at net.schmizz.sshj.userauth.method.AbstractAuthMethod.request(AbstractAuthMethod.java:68)	at net.schmizz.sshj.userauth.UserAuthImpl.authenticate(UserAuthImpl.java:73)	at net.schmizz.sshj.SSHClient.auth(SSHClient.java:221)	at net.schmizz.sshj.SSHClient.authPublickey(SSHClient.java:342)	at com.atlassian.bamboo.plugins.scp.SshTask.execute(SshTask.java:114)	at com.atlassian.bamboo.task.TaskExecutorImpl.lambda$executeTasks$3(TaskExecutorImpl.java:323)	at com.atlassian.bamboo.task.TaskExecutorImpl.executeTaskWithPrePostActions(TaskExecutorImpl.java:258)	at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:323)	at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:118)	at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:73)	at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.executeBuildPhase(DefaultBuildAgent.java:205)	at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:177)	at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.lambda$waitAndPerformBuild$0(BuildAgentControllerImpl.java:169)	at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:118)	at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:162)	at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.lambda$start$0(DefaultBuildAgent.java:122)	at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:48)	at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26)	at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:17)	at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:41)	at java.base/java.lang.Thread.run(Thread.java:829)
```


Answers:
author: Khushboo Gupta
body: Hello [@Apostal Fales](/t5/user/viewprofilepage/user-id/5468191)

Welcome to Atlassian Community!

We do have an existing bug for Bamboo 8.2 which we think could be the issue you are facing:

* [BAM-21903: SSH or SCP tasks will fail if ssh host has ed25519](https://jira.atlassian.com/browse/BAM-21903)

Do have a look at it. Could you please try the workaround given in the BAM
>
> ### Workarounds {#toc-hId-2118849358}
>
> 1. On the SCP/SSH Task use a different type of SSH private key such as RSA
> 2. Use a Script Task with proper "ssh" or "scp" commands -- This will require setting the authentication and key exchange manually on the Server and Agents

I hope this helps. Please let us know in case of any further queries.

Regards,

Khushboo Gupta  
**\*\*please don't forget to Accept the answer if your query was answered\*\***


Tags: cloud

ssh-task